_meta field for platform-level configuration that sits alongside inputSchema and outputSchema. This guide covers the three _meta capabilities:
- Rate-Limit Hints — tell the planner and runtime how to pace calls to your API
- Context Injection — declare what user-specific data the platform should inject into your tool’s arguments
- Pricing & Execute Mode Eligibility — control where your methods appear and set per-call execute pricing
Optional contributor-side search helpers are not a new
_meta contract in this rollout. If your venue needs the LLM-backed pattern described in Optional Contributor Search Helpers, keep that logic and any helper-private state inside the contributor. Standardized helper evidence now rides in contributor searchMetadata payloads and developer traces, not in ad hoc _meta.searchHelper fields.Rate-Limit Hints
Use this section if your MCP server wraps APIs with strict quotas (hobby/free tiers, burst limits, or expensive fan-out endpoints).
Why This Exists
In the marketplace, each contributor has different upstream constraints. Without pacing hints, an agent can generate loops that are valid code but operationally unsafe for your API key tier. Publishing_meta.rateLimit (or _meta.rateLimitHints) gives Context two things:
- Better planning (prefer batch/snapshot tools, avoid risky fan-out patterns)
- Safer runtime pacing (respect cooldowns and concurrency intent)
429/timeout loops and improves first-pass completion.
Metadata Shape
Add these fields to each tool definition under_meta.rateLimit:
| Field | Type | Purpose |
|---|---|---|
maxRequestsPerMinute | number | Throughput budget for this tool |
cooldownMs | number | Minimum delay between sequential calls |
maxConcurrency | number | Parallel call ceiling for this tool |
supportsBulk | boolean | Whether the tool already handles batch retrieval |
recommendedBatchTools | string[] | Preferred alternatives to fan-out loops |
notes | string | Human guidance for planner behavior |
TypeScript Example
Python Example
Contributor Guidance
- Publish hints per tool, not only globally. Heavy fan-out endpoints and lightweight snapshot endpoints should have different guidance.
- Keep
maxConcurrencyconservative for expensive or quota-sensitive endpoints. - Populate
recommendedBatchToolswhenever you offer a better aggregation endpoint. - Treat
notesas planner guidance for real-world constraints (for example, “call alone”, “use shallow scan first”).
Rate-Limit Reference Implementations
- TypeScript: Coinglass contributor server — rate limit hints + per-method pricing
- TypeScript: Normalized Data Provider — Execute-mode data broker with background ingestion,
inputSchemadefault/examples, and zero upstream rate limits - Python: Hummingbot contributor server
- Additional large-surface example: Polymarket contributor server
Context Injection
The Context Injection pattern enables MCP tools to receive user-specific data without handling authentication or credentials:- Portfolio Data — Hyperliquid positions, balances, P&L
- Prediction Markets — Polymarket positions and orders
- Wallet Data — EVM addresses and token balances
Why “Context Injection”? The platform fetches user data client-side and injects it directly into your tool’s arguments. Your server never sees private keys or credentials — just structured data ready to analyze.
When to Use Context Injection
| Use Case | Context Type | Example Query |
|---|---|---|
| Portfolio analysis | "hyperliquid" | ”Analyze my Hyperliquid positions” |
| Position tracking | "polymarket" | ”How are my Polymarket bets performing?” |
| Wallet insights | "wallet" | ”What tokens do I hold on Base?” |
Quick Start (TypeScript)
1. Declare Context Requirements
Add_meta.contextRequirements to your tool definition:
2. Handle the Injected Data
The platform injects the data as theportfolio argument:
Quick Start (Python)
1. Declare Context Requirements
2. Handle the Injected Data
How It Works
Supported Context Types
"hyperliquid" — Perpetuals & Spot
Hyperliquid portfolio data for perpetual and spot positions.
Data Source: Fetched from the public Hyperliquid Info API using the user’s linked wallet address.
"polymarket" — Prediction Markets
Polymarket positions, orders, and market data.
"wallet" — Generic EVM Wallet
Basic wallet data for any EVM-compatible chain.
Multiple Context Types
Your tool can request multiple context types:Context Injection Best Practices
Validate the injected data
Validate the injected data
The user might not have linked the required account, or they might have empty positions:
Handle empty portfolios gracefully
Handle empty portfolios gracefully
A linked wallet with no positions is valid — don’t treat it as an error:
Document the portfolio argument
Document the portfolio argument
Make it clear in your tool description that portfolio data is required:
Use outputSchema for structured responses
Use outputSchema for structured responses
Your analysis results should be machine-readable:
Security Model
Zero Credential Exposure: Your MCP server never sees private keys, API secrets, or wallet signatures. The platform fetches public data client-side and passes only the structured result to your tool.
| Security Property | How It’s Achieved |
|---|---|
| No private keys exposed | Platform fetches data client-side |
| No API keys needed | Uses public APIs (Hyperliquid Info, etc.) |
| User controls data sharing | User explicitly links accounts in Settings |
| Read-only by default | Context injection is read-only; use Handshakes for write actions |
Future Context Types
Beyond Crypto: The Context Injection system is designed to support any type of user data. We’re starting with high-value crypto data, but the architecture supports identity, preferences, and external service data.
| Context Type | Description |
|---|---|
"dydx" | dYdX perpetual positions |
"aave" | Aave lending positions |
"uniswap" | Uniswap LP positions |
"ens" | ENS names and records |
Complete Example: Portfolio Analyzer
Pricing & Execute Mode Eligibility
Most contributors start here: If you just want your tool available in the Context app (Query mode), you don’t need to configure anything in this section — set a listing response price when you register and you’re done. This section is for contributors who also want SDK developers to call their methods directly with per-call pricing (Execute mode).
How Query and Execute Work
Context runs one marketplace with two modes:| Mode | Who is the librarian? | Billing | What you get |
|---|---|---|---|
| Query | Context runtime (used via the app or client.query.run() in the SDK) | Pay-per-response (~$0.10) | Managed librarian output: plain answer or structured evidence package assembled from up to 100 MCP calls |
| Execute | Your app/agent (used via client.tools.execute() in the SDK) | Per method call (~$0.001) | Raw structured data with session spending limit visibility |
SDK consumers can use both modes. Use
client.query.run() when you want Context to be the librarian (answer, answer_with_evidence, or evidence_only, pay-per-response). Use client.tools.execute() when your agent is the librarian (raw data, per-call pricing, spending limits). See TypeScript SDK or Python SDK.Metadata Shape
Add these fields to each method definition under_meta:
| Field | Type | Purpose |
|---|---|---|
surface | "answer" | "execute" | "both" | Which mode(s) this method is eligible for (API field name) |
queryEligible | boolean | Whether the Query runtime can select this method for answer synthesis |
latencyClass | "instant" | "fast" | "slow" | "streaming" | Expected response time class (Query excludes streaming by default) |
pricing.executeUsd | string | Per-call execute price in USD (required for Execute eligibility) |
pricing.queryUsd | string | Reserved metadata for future per-method query billing (not used for billing in current rollout) |
Execute Eligibility Rule
Default Execute Price (Contributor Shortcut)
When you list your tool on the marketplace, you can set a single default execute price in the contribute form. This convenience input fans out to every method’s_meta.pricing.executeUsd at ingestion time. You don’t need to edit each method individually unless you want per-method overrides.
| Approach | How it works |
|---|---|
| Simple (recommended) | Set one default execute price in the contribute form → applied to all methods |
| Advanced | Set _meta.pricing.executeUsd per method in your MCP server code → preserved on refresh |
| Mixed | Default fills gaps; explicit method-level values take precedence |
TypeScript Example
Python Example
Choosing a Mode
| Your tool is best for… | Set surface to | Set queryEligible | Set pricing.executeUsd |
|---|---|---|---|
| Curated intelligence (e.g., “smart money analysis”) | "answer" or "both" | true | Optional (set if you also want Execute revenue) |
| Normalized raw data (e.g., “cross-exchange prices”) | "execute" or "both" | false for execute-only, true for both | Required |
| Both curated answers and raw data access | "both" | true | Required |
Pricing Guidance
| Listing response price (Query) | Suggested execute price per method | Ratio |
|---|---|---|
| $0.01 | $0.0001 | 1/100 |
| $0.05 | $0.0005 | 1/100 |
| $0.10 | $0.001 | 1/100 |
| $0.25 | $0.0025 | 1/100 |
The ~1/100 ratio is guidance, not a protocol-enforced rule. A Query response can make up to 100 method calls in one turn, so execute pricing per call should be proportionally lower.
Legacy Tools (No _meta)
Tools listed before this metadata rollout continue working in Query with unchanged economics. They receive default metadata at ingestion time:
| Field | Default |
|---|---|
surface | "both" |
queryEligible | true |
latencyClass | "slow" |
pricing.executeUsd | Not set → Query-only in Execute |
To enable Execute visibility for a legacy tool, either set a default execute price in the Developer Tools page or add
_meta.pricing.executeUsd to your MCP server code and click “Refresh Skills”.Reference Implementation
The Coinglass contributor server demonstrates all_meta capabilities in production:
- Per-method
_meta.pricing.executeUsdwith a default fallback and explicit opt-out for query-only methods - Per-method
_meta.rateLimithints built from upstream API tier constraints - Batch tool recommendations via
recommendedBatchTools
Related Guides
Handshake Architecture
For write actions: signatures, transactions, OAuth
Build & List Your Tool
Complete guide to building MCP tools

