Skip to main content
Glama

Order book fill and slippage

pm_order_book_fill
Read-only

Walks the order book level by level: VWAP, slippage in basis points against mid, what fills and what does not. Book arithmetic, not a fill-probability model.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "book": "<book>",
      "shares": "<shares>"
    },
    "name": "pm_order_book_fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
bookYesOrder book: bids and asks with price and size in shares
sideNo
priceNo
sharesYes
queue_aheadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral context beyond that: it is deterministic level-walking arithmetic, it reports partial fills, and it deliberately does not model fill probability. It stops short of edge-case behavior (empty book, one-sided book, unfilled remainder handling).

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 tightly packed sentences, front-loaded with the core mechanism and followed by the disambiguating clause. No filler, no restatement of the name or title.

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?

The description usefully names the return values (VWAP, slippage bps, filled vs unfilled), which partly compensates for the absent output schema, and it handles a nested 5-parameter tool reasonably. However, with four of five parameters undocumented in both schema and description, and no statement of edge-case behavior, the definition is only adequate for a tool of this complexity.

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 only 20% — only `book` is documented in the schema, while `shares`, `side`, `price`, and `queue_ahead` are bare. The description does not compensate: it never explains that `price` acts as a limit, how `queue_ahead` affects what fills, or that `side` selects which side of the book is walked. Those are the exact semantics an agent needs and they are left to inference.

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 a specific mechanism ("walks the order book level by level") and specific outputs (VWAP, slippage in bps against mid, partial fills), and explicitly delimits itself as "book arithmetic, not a fill-probability model." An agent can tell exactly what this computes and what it does not, which also separates it from the unrelated sibling tools (market brief, platform fee, reward eligibility).

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?

Usage is implied rather than stated: the tool is for simulating fills against a supplied book, and the closing clause implicitly excludes probability/estimation use cases. There is no explicit when-to-use, no prerequisite guidance (e.g. that a full bids/asks snapshot and a share quantity are required), and no named alternative for related questions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources