Skip to main content
Glama
yigitabi5444

Polymarket MCP Server

by yigitabi5444

get_order_book_summary

Retrieve summarized order book data for Polymarket tokens, showing best bid, best ask, and spread to analyze market liquidity and pricing.

Instructions

Get a summarized order book for a Polymarket token: best bid, best ask, and spread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_idYesCLOB token ID

Implementation Reference

  • The handler function for the 'get_order_book_summary' tool. It calls the clob API and returns the result as a JSON string.
    server.tool(
      "get_order_book_summary",
      "Get a summarized order book for a Polymarket token: best bid, best ask, and spread.",
      {
        token_id: z.string().describe("CLOB token ID"),
      },
      async (args) => {
        try {
          const data = await clob.getOrderBookSummary(args.token_id);
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error: ${(error as Error).message}` }],
            isError: true,
          };
        }
      },
  • The underlying implementation method that interacts with the CLOB API for 'get_order_book_summary'.
    async getOrderBookSummary(tokenId: string): Promise<ClobOrderBookSummary> {
      return this.client.clob<ClobOrderBookSummary>("/order-book-summary", {
        token_id: tokenId,
      });
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what data is returned but doesn't mention important behavioral aspects like rate limits, authentication requirements, error conditions, or whether this is a real-time or cached view. The description is minimal and lacks operational context.

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, efficient sentence that communicates the core purpose without any wasted words. It's appropriately front-loaded with the main action and delivers essential information in minimal space.

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 read operation with one well-documented parameter and no output schema, the description adequately covers what the tool does. However, it lacks context about the return format, data freshness, or how this differs from similar tools in the server, leaving some gaps for an agent to understand optimal usage.

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 100%, with the single parameter 'token_id' well-documented as 'CLOB token ID'. The description doesn't add any additional parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage.

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 action ('Get a summarized order book') and specifies the resource ('for a Polymarket token'), including the key data points returned (best bid, best ask, and spread). However, it doesn't explicitly differentiate this tool from its sibling 'get_order_book' or 'get_order_books', which likely provide more detailed order book data.

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 guidance on when to use this tool versus alternatives like 'get_order_book' or 'get_order_books'. It doesn't mention prerequisites, exclusions, or specific contexts where this summary view is preferred over more detailed data.

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

Install Server

Other Tools

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/yigitabi5444/yigit_polymarket_mcp'

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