Skip to main content
Glama

mcp-pear

npm CI

The Pear Protocol MCP server for Hyperliquid pair trading — connect Claude, Cursor, or any AI agent to on-chain perps: browse pair markets, read positions and portfolio, and (opt-in) execute pair trades.

Model Context Protocol (MCP) server for Pear Protocol. Gives Claude, or any MCP-compatible agent, access to markets, pair ratios, positions, orders, trade history, portfolio, and (v0.2) full trade execution on Hyperliquid.

v0.2 adds trade execution. Ten write tools (open, close, and adjust positions; manage leverage and risk; cancel orders) are off by default behind PEAR_TRADE_ENABLED=true. Pear signs server-side, so mcp-pear never holds private keys.

What is Pear Protocol?

Pear is a Hyperliquid-backed perps platform for pair markets: long one basket against another. Every pair has a live ratio that moves as the legs diverge. More at pearprotocol.io.

Related MCP server: CC Trading Terminal

Tools

Public (no auth):

  • get_health: API health and uptime

  • list_markets: browse pair markets with filters and pagination

  • get_active_markets: top gainers, losers, and highlighted pairs

  • get_pair_ratio: current ratio, 24h change, and funding for a specific pair

Authenticated read:

  • get_account_summary: your account header

  • get_open_positions: your open positions with PnL

  • get_open_orders: your open limit, TP, and SL orders

  • get_twap_orders: your active TWAP orders

  • get_trade_history: your closed trades with realized PnL

  • get_portfolio: bucketed PnL across 1d, 1w, 1m, 1y, and all-time

  • get_agent_wallet: the agent wallet Pear uses to sign your trades

Authenticated write (v0.2, gated behind PEAR_TRADE_ENABLED=true):

  • create_agent_wallet: create the agent wallet

  • open_position, close_position, close_all_positions: open and close pair positions

  • adjust_position, adjust_leverage: change size or leverage on a live position

  • set_risk_parameters: set or update TP and SL

  • cancel_order, cancel_twap_order: cancel pending orders

Full parameter reference in Tool reference. See Trade execution (v0.2) for the gate and Hyperliquid funding rules.

Install

# Run directly
npx -y @marvelcodes/mcp-pear@latest

# Or install globally
pnpm install -g @marvelcodes/mcp-pear
mcp-pear

Pin @latest (or a specific version) in the npx spec. Plain npx @marvelcodes/mcp-pear can launch a stale cached version: npx prefers its local cache over the npm registry when the spec is unpinned, so after a new release lands you may still be running the old one. @latest re-resolves against the registry each launch; pin like @0.2.0 instead if you want a frozen version. Stuck on an old version after upgrading? Clear the npx cache: rm -rf ~/.npm/_npx (macOS/Linux).

Getting an API key

For the authenticated tools, mint a key:

npx -y @marvelcodes/mcp-pear@latest setup

The CLI opens a browser, asks you to sign once with your wallet, mints a Pear API key, and (optionally) writes PEAR_API_KEY and PEAR_ADDRESS to a .env. Copy those two values into your Claude Desktop config and restart Claude.

Already have a JWT from app.pear.garden? Skip setup and use JWT pass-through below.

Configuration

Three auth modes. mcp-pear uses the first one whose env vars are set, decided on the first authenticated call.

Mode 1: JWT pass-through (multi-tenant orchestrators)

For Telegram bots and other orchestrators that mint JWTs externally (Privy, EIP-712, or any Pear-supported flow). The JWT is opaque; mcp-pear never calls /auth/login.

Env var

Required

Description

PEAR_JWT

yes

Pre-minted access token. Used directly when set. PEAR_API_KEY and PEAR_ADDRESS act as fallback if the JWT expires and no PEAR_REFRESH_TOKEN is configured.

PEAR_REFRESH_TOKEN

no

If set, mcp-pear refreshes the JWT itself when it expires mid-session (each refresh rotates the token). Without it, the orchestrator has to re-mint and respawn the subprocess.

When PEAR_JWT expires and no refresh token is set, authenticated tools return:

JWT expired; the orchestrator must mint a new one and restart mcp-pear.

See examples/telegram-bot-usage.ts for the orchestrator pattern.

Mode 2: API key + wallet address (single-user, Claude Desktop)

Env var

Required

Description

PEAR_API_KEY

for auth tools

Your Pear API key.

PEAR_ADDRESS

for auth tools

Wallet address bound to the API key (0x...).

mcp-pear mints the JWT itself by calling POST /auth/login. Both fields are required: the OpenAPI spec needs address in the request body.

Public-only mode

The four public tools work without any auth env vars. Authenticated tools return a ConfigError naming the missing env var.

Common settings (optional)

Env var

Default

Description

PEAR_API_BASE_URL

https://hl-v2.pearprotocol.io

Pear API host.

PEAR_API_TIMEOUT_MS

10000

Per-request timeout.

PEAR_CLIENT_ID

APITRADER

Client identifier sent to /auth/login.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "pear": {
      "command": "npx",
      "args": ["-y", "@marvelcodes/mcp-pear@latest"],
      "env": {
        "PEAR_API_KEY": "your-pear-api-key-here",
        "PEAR_ADDRESS": "0xYourWalletAddress"
      }
    }
  }
}

Restart Claude Desktop and ask: "Use Pear to show me the top active markets right now."

ADK-TS

import { McpToolset, StdioTransport } from "@iqai/adk";

const pearTools = new McpToolset({
	transport: new StdioTransport({
		command: "npx",
		args: ["-y", "@marvelcodes/mcp-pear@latest"],
		env: { PEAR_API_KEY: process.env.PEAR_API_KEY ?? "", PEAR_ADDRESS: process.env.PEAR_ADDRESS ?? "" },
	}),
});

await pearTools.connect();
const tools = await pearTools.listTools();

Full example in examples/adk-ts-usage.ts.

Tool reference

adjust_leverage

Change leverage (1-100x) on an existing Pear Protocol position. Higher leverage means greater liquidation risk for the same price move. WRITE: changes risk profile of a live position. Requires PEAR_TRADE_ENABLED=true.

Parameter

Type

Required

Description

positionId

string

yes

leverage

integer

yes

adjust_position

Reduce or increase an existing Pear Protocol position's size by 1-100 percent. executionType: MARKET (immediate) or LIMIT (provide limitRatio). WRITE: changes exposure on a real trade. Requires PEAR_TRADE_ENABLED=true.

Parameter

Type

Required

Description

positionId

string

yes

adjustmentType

string

yes

adjustmentSize

integer

yes

executionType

string

yes

limitRatio

number

referralCode

string

cancel_order

Cancel a pending Pear Protocol limit, take-profit, or stop-loss order by orderId. Does not affect already-filled portions. For TWAP orders, use cancel_twap_order. WRITE: cancels a live order. Requires PEAR_TRADE_ENABLED=true.

Parameter

Type

Required

Description

orderId

string

yes

cancel_twap_order

Cancel a Pear Protocol TWAP (time-weighted average price) order and all of its remaining unfilled chunks. WRITE: cancels a live order. Requires PEAR_TRADE_ENABLED=true.

Parameter

Type

Required

Description

orderId

string

yes

close_all_positions

Close every open Pear Protocol position with a single executionType (MARKET or TWAP). Returns a per-position result array with success/error. WRITE: executes real trades. Requires PEAR_TRADE_ENABLED=true.

Parameter

Type

Required

Description

executionType

string

yes

twapDuration

number

twapIntervalSeconds

number

randomizeExecution

boolean

referralCode

string

close_position

Close one open Pear Protocol position by positionId. executionType: MARKET (immediate) or TWAP (spread over time; requires twapDuration in seconds). WRITE: executes a real trade. Requires PEAR_TRADE_ENABLED=true.

Parameter

Type

Required

Description

positionId

string

yes

executionType

string

yes

twapDuration

number

twapIntervalSeconds

number

randomizeExecution

boolean

referralCode

string

create_agent_wallet

Create a new Pear Protocol agent wallet for the authenticated user. The agent wallet is what Pear uses to sign Hyperliquid trades. After creation, the user MUST approve this wallet on Hyperliquid (the response message contains the approval instructions). WRITE: executes a state change. Requires PEAR_TRADE_ENABLED=true.

No parameters

get_account_summary

Get the authenticated user's Pear Protocol account summary: agent wallet address, total closed trades, pending trigger-order USD value, pending TWAP-chunk USD value, and last sync timestamp. Requires PEAR_API_KEY.

No parameters

get_active_markets

Get the most active Pear Protocol pair markets right now: current active pairs plus top gainers, top losers, highlighted pairs, and the user's watchlist. Use to see what's hot or as a starting point for narrowing into a specific pair.

No parameters

get_agent_wallet

Get the authenticated user's Pear Protocol agent wallet address. The agent wallet is what Pear uses to sign Hyperliquid trades on the user's behalf. Returns an empty/missing address if no agent wallet has been created yet; call create_agent_wallet to create one.

No parameters

get_health

Check Pear Protocol API health. Returns service status, server timestamp, and uptime in seconds. Use this to verify the API is reachable before running other tools.

No parameters

get_open_orders

List the authenticated user's open limit, take-profit, and stop-loss orders on Pear Protocol. Returns each order's ID, type, status, and pair composition. Requires PEAR_API_KEY.

No parameters

get_open_positions

List the authenticated user's currently open Pear Protocol pair positions, including position ID, entry ratio, mark ratio, unrealized PnL, and long/short composition. Requires PEAR_API_KEY.

No parameters

get_pair_ratio

Get the current ratio (long/short composition price) for a specific Pear Protocol pair. Pass long and short asset arrays. Returns the ratio, 24h change, and funding rate. Useful when you know the pair you care about and want the latest number.

Parameter

Type

Required

Description

longAssets

array

yes

Asset symbols on the long side (e.g. ['BTC']).

shortAssets

array

yes

Asset symbols on the short side. Pass an empty array for long-only baskets.

get_portfolio

Fetch the authenticated user's full portfolio metrics on Pear Protocol: bucketed PnL across last 1 day / 1 week / 1 month / 1 year / all-time, plus overall stats (total trades, all-time volume, current open interest, unrealized PnL). Requires PEAR_API_KEY.

No parameters

get_trade_history

Fetch the authenticated user's recent closed trades on Pear Protocol with realized PnL, entry/exit ratios, and pair composition. Optional date range and limit. Requires PEAR_API_KEY.

Parameter

Type

Required

Description

limit

integer

Max number of trades to return. Default 50.

startDate

string

ISO 8601 timestamp or epoch ms. Only return trades on or after this time.

endDate

string

ISO 8601 timestamp or epoch ms. Only return trades on or before this time.

get_twap_orders

List the authenticated user's active TWAP (time-weighted average price) orders on Pear Protocol, including chunk execution and fill detail. Requires PEAR_API_KEY.

No parameters

list_markets

Browse Pear Protocol pair markets with optional filters and pagination. Each market is a long/short composition with current ratio, 24h change, volume, open interest, and funding. Use to discover what's tradable, or with searchText to find a specific pair.

Parameter

Type

Required

Description

search

string

Free-text search across market names (composition keys like `L:BTC

engine

string

Filter by execution engine.

minVolume

number

Minimum 24h volume in USD.

change24h

number

Minimum 24h ratio change (e.g. 0.05 for +5%).

netFunding

number

Filter by net funding rate.

sort

string

Sort key (e.g. 'volume', 'change24h').

page

integer

Page number (1-indexed).

pageSize

integer

Results per page. Default 20.

open_position

Open a new pair position on Pear Protocol. Specify executionType (MARKET / TRIGGER / TWAP / LADDER / TP / SL / SYNC), leverage (1-100), usdValue (≥1), slippage (0.001-0.1), and the long/short asset compositions (arrays of { asset, weight }). Optionally attach stopLoss/takeProfit and TWAP/TRIGGER/LADDER parameters. WRITE: executes a real trade. Requires PEAR_TRADE_ENABLED=true.

Parameter

Type

Required

Description

executionType

string

yes

leverage

integer

yes

usdValue

number

yes

slippage

number

yes

longAssets

array

yes

shortAssets

array

yes

triggerValue

number

triggerType

string

direction

string

twapDuration

number

twapIntervalSeconds

number

randomizeExecution

boolean

ladderConfig

object

stopLoss

unknown

takeProfit

unknown

referralCode

string

set_risk_parameters

Set or update stop-loss / take-profit on an existing Pear Protocol position. Each threshold has type ('PRICE' or 'PERCENTAGE'), value, and optional trailing fields. Pass null to clear a field; omit it to leave unchanged. WRITE: changes risk parameters on a live position. Requires PEAR_TRADE_ENABLED=true.

Parameter

Type

Required

Description

positionId

string

yes

stopLoss

unknown

takeProfit

unknown

Development

pnpm install
pnpm run build
pnpm test
pnpm run lint
pnpm run format

Live smoke tests:

PEAR_API_KEY=<real> pnpm test smoke

Trade execution (v0.2)

Ten new tools that take mcp-pear from read-only to write. All write tools are off by default. Set PEAR_TRADE_ENABLED=true to unlock them (strict literal match on "true"; anything else, including "True", "1", or "yes", keeps writes disabled). Pear signs trades server-side via an agent wallet you create, so mcp-pear never holds private keys for trades.

Tool

Type

Description

get_agent_wallet

read

Get the agent wallet Pear uses to sign your trades.

create_agent_wallet

write

Create one. After creation, approve it on Hyperliquid (the response message contains the instructions).

open_position

write

Open a pair position. Supports MARKET, TRIGGER, TWAP, LADDER, TP, SL, SYNC.

close_position

write

Close one position by id (MARKET or TWAP).

close_all_positions

write

Close every open position with one execution type.

adjust_position

write

Reduce or increase position size by 1 to 100 percent. MARKET or LIMIT.

adjust_leverage

write

Set leverage 1 to 100x on an existing position. Carries liquidation risk.

set_risk_parameters

write

Set or update TP and SL on an existing position.

cancel_order

write

Cancel a pending limit, TP, or SL order.

cancel_twap_order

write

Cancel a TWAP order and its remaining chunks.

Env var

Default

Description

PEAR_TRADE_ENABLED

unset

Set to "true" (lowercase, exact) to unlock the write tools. Anything else keeps them disabled and the gate error is returned to the LLM.

When PEAR_TRADE_ENABLED=true, mcp-pear logs [mcp-pear] PEAR_TRADE_ENABLED=true. Trade execution unlocked. to stderr on startup so operators can see writes are live.

Funding and minimums

Trades execute on Hyperliquid, which margins positions from your Perps balance. Two things bite first-time operators:

  • Minimum order size. Hyperliquid rejects orders below ~$10 notional. usdValue is the position's USD notional (margin = usdValue / leverage), so a single-leg position needs usdValue at or above 10. A long plus short pair is two separate orders, each subject to the $10 floor (about $20 or more notional total).

  • Spot vs Perps balance. USDC bridged onto Hyperliquid (for example via Circle CCTP) often lands in your Spot balance. Move it to Perps in the Hyperliquid app before trading, or open_position fails with insufficient margin.

What's next

v0.3. WebSocket streaming for real-time market and position updates. Spot orders. Candle synthesis from Hyperliquid candleSnapshot.

FAQ

What is the Pear Protocol MCP server? mcp-pear is a Model Context Protocol (MCP) server that gives Claude and other AI agents access to Pear Protocol — a Hyperliquid-backed platform for pair trading (long one basket against another). It exposes tools to browse pair markets and ratios, read positions, orders, and portfolio, and optionally execute pair trades.

How do I build a Pear Protocol trading agent? Point any MCP client at npx -y @marvelcodes/mcp-pear@latest. The agent gets read tools out of the box (markets, ratios, positions, portfolio). To let it trade, set PEAR_TRADE_ENABLED=true and add PEAR_API_KEY + PEAR_ADDRESS; it can then call open_position (MARKET / TRIGGER / TWAP / LADDER), close_position, adjust_leverage, and set_risk_parameters. See Claude Desktop and ADK-TS for wiring examples.

Does it support Hyperliquid pair trading? Yes. Pear runs on Hyperliquid, so every pair position is a long/short perp trade executed on Hyperliquid. mcp-pear covers the full lifecycle: open, adjust, set TP/SL, and close.

Is this the official Pear Protocol MCP server? No. mcp-pear is an independent, open-source community project that wraps Pear's public API. It is not affiliated with or endorsed by Pear Protocol.

Disclaimer

Not affiliated with Pear Protocol. Independent wrapper around Pear's public API. v0.2 trade-execution tools are off by default and require explicit operator opt-in (PEAR_TRADE_ENABLED=true). Pear signs server-side, so mcp-pear never holds private keys. Use at your own risk; no warranty.

License

MIT. See LICENSE.

Available Tools

20 tools
adjust_leverageA

Change leverage (1-100x) on an existing Pear Protocol position. Higher leverage means greater liquidation risk for the same price move. WRITE: changes risk profile of a live position. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
positionIdYes
leverageYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description covers write nature and liquidation risk, but lacks disclosure on idempotency, error behavior, or permission requirements beyond the prerequisite.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences plus one line, front-loaded with purpose and range, efficient use of words, no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 2-param tool with no output schema, description covers purpose, risk, write nature, and prerequisite. Could mention return value or common errors, but adequate overall.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, so description adds meaning: 'positionId' is existing position, 'leverage' is 1-100x multiplier. Range is clarified, but positionId semantics could be more explicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states specific verb 'change' and resource 'leverage on an existing Pear Protocol position', with range 1-100x. Clearly distinguishes from sibling 'open_position' (new) and 'adjust_position' (general adjustments).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides risk warning and indicates it is a write operation, but does not explicitly state when not to use or compare with alternative tools like 'adjust_position' which might also modify leverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

adjust_positionA

Reduce or increase an existing Pear Protocol position's size by 1-100 percent. executionType: MARKET (immediate) or LIMIT (provide limitRatio). WRITE: changes exposure on a real trade. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
positionIdYes
adjustmentTypeYes
adjustmentSizeYes
executionTypeYes
limitRatioNo
referralCodeNo

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavior. Notes it is a WRITE operation changing real exposure and mentions execution types. Lacks details on side effects, reversibility, or error conditions, but covers basic behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: one sentence with key details front-loaded. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, no output schema, and no annotations, description could provide more: return value, error handling, rate limits. Covers core action and execution types but lacks completeness for a complex mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so description must add meaning. Explains executionType and implies adjustmentSize is percentage. Does not explain positionId, adjustmentType, limitRatio (meaning of ratio), or referralCode. Adds some value but incomplete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description explicitly states verb 'Reduce or increase' and resource 'existing Pear Protocol position's size by 1-100 percent'. Clearly distinguishes from sibling tools like close_position (full close) and adjust_leverage (change leverage).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides usage context: executionType choices (MARKET vs LIMIT) and prerequisite env var. Does not explicitly state when not to use or compare with alternatives, but context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

cancel_orderA

Cancel a pending Pear Protocol limit, take-profit, or stop-loss order by orderId. Does not affect already-filled portions. For TWAP orders, use cancel_twap_order. WRITE: cancels a live order. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
orderIdYes

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description fully carries the burden. Explicitly states it is a WRITE operation ('cancels a live order') and highlights the environment variable requirement. Also clarifies it does not affect filled portions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with no redundancy. Each sentence contributes critical information: action, effect on filled portions, alternative for TWAP, and side effect/requirement. Perfectly front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has only one parameter, no output schema, and no annotations, the description covers all essential aspects: operation, scope, limitations, alternatives, and prerequisites. No gaps for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage. The description mentions 'by orderId', giving context that the parameter identifies the order. However, lacks additional details like format or where to obtain the orderId. Still adds meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it cancels pending Pear Protocol orders (limit, take-profit, stop-loss) by orderId. Distinguishes itself from sibling cancel_twap_order by explicitly saying 'For TWAP orders, use cancel_twap_order'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use (cancelling limit, TP, SL orders) and when-not-to-use (TWAP orders). Also notes that already-filled portions are not affected and requires PEAR_TRADE_ENABLED=true.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

cancel_twap_orderA

Cancel a Pear Protocol TWAP (time-weighted average price) order and all of its remaining unfilled chunks. WRITE: cancels a live order. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
orderIdYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It clearly states the tool cancels a live order and its unfilled chunks, revealing its destructive nature. However, it lacks mention of side effects, error conditions, or idempotency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences. The first sentence clearly states the purpose, and the second adds essential context. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema), the description covers the core functionality and a key requirement. It could mention expected outputs or error scenarios, but overall it is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter (orderId) with 0% description coverage. The description does not explicitly describe the parameter or its format, leaving the agent to infer its role from context. This is insufficient for a tool with no schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Cancel a Pear Protocol TWAP order and all of its remaining unfilled chunks,' specifying a clear verb (Cancel), resource (TWAP order), and scope (all unfilled chunks). It also distinguishes from the sibling tool 'cancel_order' by focusing on TWAP orders.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions it is a WRITE operation and requires PEAR_TRADE_ENABLED=true, implying readiness. However, it does not explicitly contrast with the sibling 'cancel_order' tool or provide when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

close_all_positionsA

Close every open Pear Protocol position with a single executionType (MARKET or TWAP). Returns a per-position result array with success/error. WRITE: executes real trades. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
executionTypeYes
twapDurationNo
twapIntervalSecondsNo
randomizeExecutionNo
referralCodeNo

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that this is a write operation that executes real trades and requires a specific environment variable. With no annotations provided, the description carries the full burden, and it adequately communicates the mutation and necessary configuration. It also mentions the return is a per-position result array with success/error, which is useful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at two sentences, front-loading the core action and then adding the return type and warning. It avoids unnecessary detail. However, it could benefit from slight structuring (e.g., listing parameters or conditions) without significantly increasing length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, no output schema, and no parameter descriptions in the schema, the description is incomplete. It fails to explain the TWAP-related parameters (duration, interval, randomization) and the referral code. The return structure is vaguely described but not detailed enough for an agent to confidently parse the result array.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 5 parameters with 0% description coverage. The description only addresses the executionType parameter by naming its enum values. The other parameters (twapDuration, twapIntervalSeconds, randomizeExecution, referralCode) are not explained, leaving their semantics unclear. This is a significant gap since the schema does not provide any descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: closing every open Pear Protocol position. It specifies the required executionType parameter (MARKET or TWAP), which distinguishes it from sibling 'close_position' that closes a single position. The verb+resource combination is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description indicates it closes all positions, implying it should be used when batch closing is needed. However, it does not explicitly contrast with the alternative of using 'close_position' repeatedly or provide conditions for when not to use it. The prerequisite 'PEAR_TRADE_ENABLED=true' is noted, but no exclusion criteria are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

close_positionA

Close one open Pear Protocol position by positionId. executionType: MARKET (immediate) or TWAP (spread over time; requires twapDuration in seconds). WRITE: executes a real trade. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
positionIdYes
executionTypeYes
twapDurationNo
twapIntervalSecondsNo
randomizeExecutionNo
referralCodeNo

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses that this is a write operation executing a real trade and requires an environment variable. Without annotations, it carries full burden but omits side effects, auth, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each adding essential information: main action, execution options, behavioral context. No redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema provided, and description does not hint at return type. For a complex tool with 6 parameters and two execution modes, more details on optional parameters and response would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description only explains positionId, executionType, and twapDuration. Leaves twapIntervalSeconds, randomizeExecution, referralCode undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb (close), resource (one open Pear Protocol position), and method (by positionId). It distinguishes from sibling tool close_all_positions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides when to use: to close a position by ID with MARKET or TWAP execution. Mentions requirement PEAR_TRADE_ENABLED=true but does not explicitly state when not to use or compare to alternatives like adjust_position or close_all_positions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_agent_walletA

Create a new Pear Protocol agent wallet for the authenticated user. The agent wallet is what Pear uses to sign Hyperliquid trades. After creation, the user MUST approve this wallet on Hyperliquid (the response message contains the approval instructions). WRITE: executes a state change. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses that it is a WRITE (state change), requires a specific environment variable, and outlines the necessary follow-up step. Could mention idempotency or error handling but is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: two sentences plus a brief note. Every sentence adds value, no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and no output schema, the description covers all necessary aspects: purpose, requirement, post-creation action, and state change. Complete for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in input schema, so baseline is 4. Description adds no parameter info, which is acceptable since there are none.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a new agent wallet for the authenticated user, explains its purpose (signing Hyperliquid trades), and distinguishes it from sibling tools like get_agent_wallet.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides context on when to use (creating a wallet) and includes a critical requirement (PEAR_TRADE_ENABLED=true) and a mandatory post-creation action (approval on Hyperliquid). Lacks explicit exclusions or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_account_summaryA

Get the authenticated user's Pear Protocol account summary: agent wallet address, total closed trades, pending trigger-order USD value, pending TWAP-chunk USD value, and last sync timestamp. Requires PEAR_API_KEY.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden for behavioral disclosure. It identifies the tool as a read operation ('Get'), lists output fields, and notes the auth requirement. However, it does not discuss rate limits, potential errors, or what happens if the API key is invalid or missing. It is adequate but not detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-organized sentence that front-loads the purpose and lists the included fields without extraneous words. Every part contributes useful information, making it concise and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the lack of an output schema, the description enumerates all returned fields, providing sufficient context for the agent. The auth requirement is also specified. For a simple, parameterless tool, this covers all necessary information for correct invocation and interpretation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the input schema provides full coverage. The description adds no further parameter detail, which is appropriate given the lack of parameters. The baseline score of 4 is justified as there is no need for additional parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves the authenticated user's account summary and lists specific fields (agent wallet address, closed trades, etc.). It uses a specific verb (Get) and resource (account summary), and distinguishes from siblings like get_portfolio and get_agent_wallet by indicating the summary includes multiple aggregated pieces of data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions the requirement for PEAR_API_KEY, implying authentication context, but does not explicitly state when to use this tool over similar siblings like get_portfolio or get_health. There is no guidance on alternatives or exclusions, leaving the agent to infer usage based on the listed fields.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_active_marketsA

Get the most active Pear Protocol pair markets right now: current active pairs plus top gainers, top losers, highlighted pairs, and the user's watchlist. Use to see what's hot or as a starting point for narrowing into a specific pair.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. The verb 'Get' implies a read-only operation with no side effects, and there is no mention of modifications or destructive actions. However, it could be more explicit about safety, but the implication is strong enough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first describes output, second gives usage guidance. No fluff, front-loaded with key information. Each sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and no output schema, the description fully covers what the tool returns and when to use it. It is complete for the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, so the baseline is 4. The description adds value by detailing what data is returned (categories of markets), which goes beyond the empty schema and compensates for any potential ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the verb 'Get' and the resource: active Pear Protocol pair markets including specific categories (current active pairs, top gainers, top losers, highlighted pairs, user's watchlist). This distinguishes it from sibling tools like list_markets, which likely lists all markets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states when to use the tool: 'to see what's hot or as a starting point for narrowing into a specific pair.' It does not explicitly mention alternatives, but the usage context is clear enough for an agent to infer appropriateness.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_agent_walletA

Get the authenticated user's Pear Protocol agent wallet address. The agent wallet is what Pear uses to sign Hyperliquid trades on the user's behalf. Returns an empty/missing address if no agent wallet has been created yet; call create_agent_wallet to create one.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description reveals that the tool returns an empty/missing address if no agent wallet exists, signaling a non-destructive read. Could mention authentication or side effects but not required.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, no unnecessary words. Each sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter read tool without output schema, the description fully covers purpose, return edge case, and next action. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so schema coverage is 100%. Description adds no parameter info as none needed. Baseline score of 4 applies due to zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly describes the tool as retrieving the authenticated user's agent wallet address, explains what the agent wallet is, and distinguishes from create_agent_wallet by indicating when an address might be missing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tells the agent when to use (to get agent wallet) and what to do if address is empty (call create_agent_wallet). Does not explicitly mention when not to use, but sibling list helps.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_healthA

Check Pear Protocol API health. Returns service status, server timestamp, and uptime in seconds. Use this to verify the API is reachable before running other tools.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but the description discloses the return fields (status, timestamp, uptime). Since this is a read-only health check, this is sufficient transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, no waste. The first sentence states the purpose, the second provides usage guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, so the description correctly covers return values. For a simple health-check tool, this is complete and leaves no ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in schema (coverage 100%). Description adds value by explaining return values, though param semantics are not applicable. Baseline is 4 for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Check Pear Protocol API health'. It specifies the return values (service status, server timestamp, uptime) and the context differentiates it from sibling trading tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance: 'Use this to verify the API is reachable before running other tools.' This tells the agent when to invoke the tool, and implies it precedes other operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_open_ordersA

List the authenticated user's open limit, take-profit, and stop-loss orders on Pear Protocol. Returns each order's ID, type, status, and pair composition. Requires PEAR_API_KEY.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the burden. It discloses the authentication requirement but does not mention read-only nature, pagination, rate limits, or response size. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no redundancy. The first sentence states the core action and scope; the second lists return fields. Auth requirement is efficiently included. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no output schema), the description covers essential context: what it lists, for whom, and what fields are returned. It is complete for an agent to understand and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so the description adds no parameter meaning (unnecessary). Baseline for 0 parameters is 4, as no additional semantic help is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists open orders for the authenticated user, specifying order types (limit, take-profit, stop-loss) and return fields (ID, type, status, pair composition). It effectively distinguishes from sibling tools like get_open_positions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a prerequisite (requires PEAR_API_KEY) but lacks explicit guidance on when to use this tool versus alternatives like cancel_order or adjust_leverage. Usage context is implied but not formally stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_open_positionsA

List the authenticated user's currently open Pear Protocol pair positions, including position ID, entry ratio, mark ratio, unrealized PnL, and long/short composition. Requires PEAR_API_KEY.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must cover behavioral traits. It states 'Requires PEAR_API_KEY' as a prerequisite, which is helpful, but does not explicitly state that the operation is read-only or safe. For a read operation, more explicit safety cues would improve transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: one for purpose and output fields, one for the requirement. No unnecessary words; front-loaded with the action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and no output schema, the description covers the tool's purpose, key return fields, and a hard requirement (API key). It does not cover potential errors, pagination, or limits, but for a simple list tool it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters, so the description does not need to explain parameter semantics. It adds value by listing the output fields (position ID, entry ratio, etc.), which is relevant for understanding the tool's return.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List the authenticated user's currently open Pear Protocol pair positions' with a specific verb and resource. It distinguishes from siblings like get_open_orders and close_position by focusing on pair positions. Includes details on returned fields (position ID, entry ratio, etc.).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions the requirement of PEAR_API_KEY but does not provide explicit guidance on when to use this tool versus alternatives like get_open_orders or get_portfolio. No when-not or exclusion criteria stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_pair_ratioA

Get the current ratio (long/short composition price) for a specific Pear Protocol pair. Pass long and short asset arrays. Returns the ratio, 24h change, and funding rate. Useful when you know the pair you care about and want the latest number.

ParametersJSON Schema
NameRequiredDescriptionDefault
longAssetsYesAsset symbols on the long side (e.g. ['BTC']).
shortAssetsYesAsset symbols on the short side. Pass an empty array for long-only baskets.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It clearly indicates a read operation and lists the returned data (ratio, 24h change, funding rate), providing adequate transparency about the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and every sentence is informative without fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description provides essential context: what the tool does, what inputs are needed, and what outputs to expect. While no output schema exists, the description covers return values adequately for a simple data-retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds value beyond the schema by explaining that shortAssets can be empty for long-only baskets and that the tool returns the latest ratio. This clarifies usage beyond the parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('Get') and resource ('pair ratio'), and explicitly mentions the input parameters (long and short asset arrays). It distinguishes this data-retrieval tool from sibling trading tools like open_position.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes 'Useful when you know the pair you care about and want the latest number,' which gives context but does not explicitly state when not to use this tool or mention alternative tools for other scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_portfolioA

Fetch the authenticated user's full portfolio metrics on Pear Protocol: bucketed PnL across last 1 day / 1 week / 1 month / 1 year / all-time, plus overall stats (total trades, all-time volume, current open interest, unrealized PnL). Requires PEAR_API_KEY.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden for behavioral disclosure. It states a key requirement ('Requires PEAR_API_KEY') and implies a read operation, but does not mention idempotency, rate limits, or potential side effects. The listed return metrics add some transparency, but more detail (e.g., response format, performance) would improve clarity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences: the first clearly states the purpose and lists key metrics, the second adds an authentication requirement. No extraneous words, and the key information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description adequately explains the return data (bucketed PnL, overall stats). It covers the main metrics an agent would need, though it lacks structural details (e.g., nesting, pagination). The tool has no parameters, so complexity is low, and the description is mostly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema coverage is 100% (trivially). The description correctly omits parameter details, and the baseline for no parameters is 4, which is appropriate as no additional semantic value is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches the authenticated user's full portfolio metrics on Pear Protocol, listing specific metrics like bucketed PnL and overall stats. It uses a specific verb ('Fetch') and resource ('portfolio metrics'), but does not explicitly differentiate from sibling tools such as get_account_summary or get_trade_history.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives like get_account_summary or get_open_positions. It lacks 'when-to-use' or 'when-not-to-use' context, leaving the agent to infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_trade_historyA

Fetch the authenticated user's recent closed trades on Pear Protocol with realized PnL, entry/exit ratios, and pair composition. Optional date range and limit. Requires PEAR_API_KEY.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax number of trades to return. Default 50.
startDateNoISO 8601 timestamp or epoch ms. Only return trades on or after this time.
endDateNoISO 8601 timestamp or epoch ms. Only return trades on or before this time.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool reads closed trades and requires authentication, but does not detail behavior like pagination, ordering, or how results are returned. Adequate for basic safety, but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences that are front-loaded with purpose and include key details (optional parameters, auth requirement). Every sentence adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with 3 optional parameters and no output schema, the description covers the main use case and distinguishes from siblings. However, it omits default values (e.g., limit=50) and sorting behavior, which would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear parameter descriptions. The description only summarizes optional date range and limit without adding new meaning beyond what the schema provides. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches the authenticated user's recent closed trades, specifying realized PnL, entry/exit ratios, and pair composition. This distinct purpose differentiates it from sibling tools like get_open_positions or get_portfolio.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions optional date range and limit, and requires an API key, but does not explicitly state when to use this tool over alternatives or provide any exclusions. Usage context is clear but lacks comparative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_twap_ordersA

List the authenticated user's active TWAP (time-weighted average price) orders on Pear Protocol, including chunk execution and fill detail. Requires PEAR_API_KEY.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only adds the authentication requirement and hints at return content but does not disclose side effects, rate limits, pagination, or error behavior. Minimal behavioral context beyond the read nature implied by 'List'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence of 15 words efficiently conveys purpose, scope, and a key requirement. No extraneous information, perfectly front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple zero-parameter list tool, the description covers purpose, result content, and auth. However, it lacks context on empty results, error cases, or response structure, leaving some gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters with 100% coverage, so the description does not need to add parameter details. The mention of API key authentication is relevant but not a parameter. Baseline score of 4 for 0 parameters is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the verb 'List', the resource 'active TWAP orders', the protocol 'Pear Protocol', and additional detail about chunk execution and fill detail. It clearly distinguishes from sibling tools like 'get_open_orders' which likely handle non-TWAP orders.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions the prerequisite 'Requires PEAR_API_KEY' but does not provide explicit guidance on when to use this tool over siblings like 'get_open_orders' or 'cancel_twap_order'. Usage context is implied by the TWAP-specific focus.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_marketsA

Browse Pear Protocol pair markets with optional filters and pagination. Each market is a long/short composition with current ratio, 24h change, volume, open interest, and funding. Use to discover what's tradable, or with searchText to find a specific pair.

ParametersJSON Schema
NameRequiredDescriptionDefault
searchNoFree-text search across market names (composition keys like `L:BTC|S:ETH`).
engineNoFilter by execution engine.
minVolumeNoMinimum 24h volume in USD.
change24hNoMinimum 24h ratio change (e.g. 0.05 for +5%).
netFundingNoFilter by net funding rate.
sortNoSort key (e.g. 'volume', 'change24h').
pageNoPage number (1-indexed).
pageSizeNoResults per page. Default 20.

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations, so description carries full burden. Describes it as read-only (browse, discover) and lists return fields. However, pagination behavior (default page size, maximum) and rate limits are not disclosed. Could be more explicit about response structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences front-load purpose and fields, second sentence gives usage advice. No wasted words, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, description lists key fields returned (ratio, change, volume, etc.) and mentions pagination. Missing details like response envelope or total count, but sufficient for a list tool. Parameters are all optional, which is clear from schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage with detailed descriptions. Description adds context for search parameter ('searchText') and general filter purpose, but does not explain constraints like page being 1-indexed or default values. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb 'browse' and resource 'markets', listing key fields. Distinguishes from siblings that are mostly actions on positions/orders, but does not explicitly mention related sibling tools like get_active_markets or get_pair_ratio.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides usage guidance: 'Use to discover what's tradable, or with searchText to find a specific pair.' However, does not mention when not to use it or suggest alternatives, such as get_active_markets for only active markets.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

open_positionA

Open a new pair position on Pear Protocol. Specify executionType (MARKET / TRIGGER / TWAP / LADDER / TP / SL / SYNC), leverage (1-100), usdValue (≥1), slippage (0.001-0.1), and the long/short asset compositions (arrays of { asset, weight }). Optionally attach stopLoss/takeProfit and TWAP/TRIGGER/LADDER parameters. WRITE: executes a real trade. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
executionTypeYes
leverageYes
usdValueYes
slippageYes
longAssetsYes
shortAssetsYes
triggerValueNo
triggerTypeNo
directionNo
twapDurationNo
twapIntervalSecondsNo
randomizeExecutionNo
ladderConfigNo
stopLossNo
takeProfitNo
referralCodeNo

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses it's a real trade (WRITE) and a prerequisite, but doesn't detail side effects or state changes beyond the obvious. Adequate but not exceptional.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences pack essential information, but the dense list could benefit from structured formatting for easier parsing. Still efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (16 parameters, nested objects, no output schema), the description lacks depth. It doesn't explain return values or cover all parameter details, making it incomplete for confident usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It explains executionType, leverage, usdValue, slippage, and asset arrays, but many parameters (triggerValue, triggerType, direction, twapDuration, etc.) are left unexplained, leaving gaps for a 16-parameter tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Open a new pair position on Pear Protocol') and lists key parameters, distinguishing it from sibling tools like close_position and adjust_position.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It mentions 'WRITE: executes a real trade' and requires 'PEAR_TRADE_ENABLED=true', providing context for when to use. However, it does not explicitly exclude other tools or describe when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set_risk_parametersA

Set or update stop-loss / take-profit on an existing Pear Protocol position. Each threshold has type ('PRICE' or 'PERCENTAGE'), value, and optional trailing fields. Pass null to clear a field; omit it to leave unchanged. WRITE: changes risk parameters on a live position. Requires PEAR_TRADE_ENABLED=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
positionIdYes
stopLossNo
takeProfitNo

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the full burden. It discloses the write nature ('WRITE: changes risk parameters on a live position') and a prerequisite condition. It does not detail side effects or rate limits, but the main behavioral traits are transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences long, front-loaded with the purpose, then breaking down parameter behavior, then stating the write operation and requirement. Every sentence adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 3 parameters and no output schema, the description covers the essential aspects: what the tool does, how to use the parameters (clear vs. omit), and a prerequisite. It could mention the return format but is otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description adds meaning: it explains that thresholds have type, value, and optional trailing fields, and clarifies null vs. omit behavior. This goes beyond the schema's structural definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool's purpose: 'Set or update stop-loss / take-profit on an existing Pear Protocol position.' This is a specific verb+resource combination that clearly distinguishes it from sibling tools like adjust_leverage or close_position.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides usage context: 'Pass null to clear a field; omit it to leave unchanged.' and 'Requires PEAR_TRADE_ENABLED=true.' It does not explicitly mention alternatives or when not to use, but the guidelines are clear for the intended use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 10 tool updatesv0.2.0
    • Addedadjust_leverage
    • Addedadjust_position
    • Addedcancel_order
    • Addedcancel_twap_order
    • Addedclose_all_positions
    • Addedclose_position
    • Addedcreate_agent_wallet
    • Addedget_agent_wallet
    • Addedopen_position
    • Addedset_risk_parameters
  2. 10 tool updatesv0.1.4
    • First observedget_account_summary
    • First observedget_active_markets
    • First observedget_health
    • First observedget_open_orders
    • First observedget_open_positions
    • First observedget_pair_ratio
    • First observedget_portfolio
    • First observedget_trade_history
    • First observedget_twap_orders
    • First observedlist_markets

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clear, distinct purpose with no overlap. For example, adjust_leverage and adjust_position operate on different aspects of a position, and cancel_order vs. cancel_twap_order are clearly separated for different order types. The descriptions effectively disambiguate any potential confusion.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (e.g., get_account_summary, close_position, open_position). There are no deviations or mixed conventions, making the naming predictable and easy to understand.

Tool Count5/5

With 20 tools, the server is well-scoped for a trading platform. Each tool addresses a specific operation such as market discovery, position management, order handling, and risk control, without feeling excessive or sparse.

Completeness4/5

The tool set covers the main trading lifecycle: market data, position opening/adjusting/closing, order management (limit, TP/SL, TWAP), account info, and health checks. Minor gaps exist, such as the absence of an order modification tool, but the core CRUD and risk operations are well covered.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A read-only MCP server that connects Claude to your eToro account, enabling queries about your portfolio, P\&L, balances, watchlists, live prices, and price history.
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Read-only MCP server for Gryps venue state, enabling Claude to query live markets, fee schedules, funding parameters, and open interest.
    6
    127
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A read-only MCP server for querying Hyperliquid perp markets, funding rates, order books, candles, and account positions/fills/funding for any address, without needing API keys or wallets.
    8
    55
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MarvelNwachukwu/mcp-pear'

If you have feedback or need assistance with the MCP directory API, please join our Discord server