Skip to main content
Glama

Get coin swaps

zora_get_coin_swaps

Retrieve recent buy and sell swap activity for any coin on the Zora Coins ecosystem, enabling users to analyze trading patterns and market movements.

Instructions

Fetch recent buy/sell swap activity for a coin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
chainIdNo
afterNo
firstNo

Implementation Reference

  • src/index.ts:164-186 (registration)
    Registration of the 'zora_get_coin_swaps' MCP tool, including inline input schema validation and handler function that calls CoinsSDK.getCoinSwaps to fetch swap activity.
    server.registerTool(
      "zora_get_coin_swaps",
      {
        title: "Get coin swaps",
        description: "Fetch recent buy/sell swap activity for a coin.",
        inputSchema: {
          address: z.string(),
          chainId: z.number().default(DEFAULT_CHAIN.id),
          after: z.string().optional(),
          first: z.number().int().min(1).max(100).optional(),
        },
      },
      async ({ address, chainId, after, first }) => {
        // @ts-expect-error - TypeScript can't resolve barrel exports properly
        const resp = await CoinsSDK.getCoinSwaps({
          address,
          chain: chainId,
          after,
          first,
        });
        return { content: [{ type: "text", text: json(resp) }] };
      }
    );
  • Handler function for 'zora_get_coin_swaps' tool: extracts parameters, calls CoinsSDK.getCoinSwaps API, and returns JSON-formatted response in MCP content format.
    async ({ address, chainId, after, first }) => {
      // @ts-expect-error - TypeScript can't resolve barrel exports properly
      const resp = await CoinsSDK.getCoinSwaps({
        address,
        chain: chainId,
        after,
        first,
      });
      return { content: [{ type: "text", text: json(resp) }] };
    }
  • Input schema and metadata for 'zora_get_coin_swaps' tool using Zod validation: requires coin address, optional chainId (defaults to Base), pagination params.
    {
      title: "Get coin swaps",
      description: "Fetch recent buy/sell swap activity for a coin.",
      inputSchema: {
        address: z.string(),
        chainId: z.number().default(DEFAULT_CHAIN.id),
        after: z.string().optional(),
        first: z.number().int().min(1).max(100).optional(),
      },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Fetch recent buy/sell swap activity', implying a read-only operation, but doesn't cover critical aspects like rate limits, authentication needs, data freshness, or error handling, which are essential for safe and effective use.

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 directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 of a 4-parameter tool with no annotations, 0% schema coverage, and no output schema, the description is insufficient. It lacks details on parameter usage, behavioral traits, and expected outputs, making it incomplete for effective agent operation.

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%, so the schema provides no parameter details. The description mentions 'coin' but doesn't explain how parameters like 'address', 'chainId', 'after', or 'first' relate to fetching swap activity, leaving their meaning and usage unclear.

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 ('Fetch') and resource ('recent buy/sell swap activity for a coin'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'zora_get_coin' or 'zora_trade_coin', which might also involve coin-related operations, so it doesn't reach the highest score.

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. It doesn't mention sibling tools like 'zora_get_coin' for general coin info or 'zora_explore_last_traded' for similar activity, leaving the agent without context for selection.

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/r4topunk/zora-coins-mcp-server'

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