Skip to main content
Glama
jun229

truemarkets-mcp-server

by jun229

Prepare a token transfer

tm_prepare_transfer
Read-only

Prepare cryptocurrency transfers to external wallets by specifying destination address, token, amount, and blockchain. Generates transfer details and ID for subsequent execution.

Instructions

Prepare a transfer to an external wallet address. Returns transfer details and a transfer_id for execution with tm_execute_transfer.

Args:

  • to (string): Destination wallet address

  • token (string): Token symbol or contract address

  • amount (string): Quantity as decimal string

  • chain ("solana" | "base"): Chain (default: solana)

  • qty_unit ("base" | "quote"): Amount unit (default: base)

Returns: { transfer_id, to, token, amount, chain }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesDestination wallet address
tokenYesToken symbol or address
amountYesAmount to transfer
chainNosolana
qty_unitNobase

Implementation Reference

  • Handler implementation for tm_prepare_transfer which resolves assets and calls the API to prepare a transfer.
      async ({ to, token, amount, chain, qty_unit }) => {
        let asset = token;
        let resolvedChain = chain;
    
        if (isSymbol(token)) {
          const assets = await api.getAssets();
          const match = assets.find(
            (a) => a.symbol?.toLowerCase() === token.toLowerCase()
          );
          if (!match?.address) {
            return {
              isError: true,
              content: [{ type: "text", text: `Could not resolve symbol "${token}".` }],
            };
          }
          asset = match.address;
          if (match.chain) resolvedChain = match.chain.toLowerCase() as "solana" | "base";
        }
    
        const resp = await api.prepareTransfer({
          chain: resolvedChain,
          asset,
          to,
          qty: amount,
          qty_unit,
        });
    
        const output = {
          transfer_id: resp.transfer_id ?? null,
          to,
          token: token.toUpperCase(),
          amount,
          chain: resolvedChain,
          has_payloads: !!(resp.payloads && resp.payloads.length > 0),
        };
    
        return {
          content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
          structuredContent: output,
        };
      }
    );
  • Registration of the tm_prepare_transfer tool, including its input schema and description.
      server.registerTool(
        "tm_prepare_transfer",
        {
          title: "Prepare a token transfer",
          description: `Prepare a transfer to an external wallet address. Returns transfer
    details and a transfer_id for execution with tm_execute_transfer.
    
    Args:
      - to (string): Destination wallet address
      - token (string): Token symbol or contract address
      - amount (string): Quantity as decimal string
      - chain ("solana" | "base"): Chain (default: solana)
      - qty_unit ("base" | "quote"): Amount unit (default: base)
    
    Returns: { transfer_id, to, token, amount, chain }`,
          inputSchema: {
            to: z.string().describe("Destination wallet address"),
            token: z.string().describe("Token symbol or address"),
            amount: z.string().describe("Amount to transfer"),
            chain: z.enum(["solana", "base"]).default("solana"),
            qty_unit: z.enum(["base", "quote"]).default("base"),
          },
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: false,
            openWorldHint: true,
          },
        },
Behavior4/5

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

The description adds valuable context beyond annotations: it clarifies this is a preparation step that returns a transfer_id for later execution, which explains why readOnlyHint=true despite 'transfer' terminology. It doesn't contradict annotations (which indicate read-only, non-destructive, non-idempotent, open-world). However, it could mention rate limits or authentication requirements to reach a perfect score.

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 perfectly structured: a clear purpose statement in the first sentence, followed by a concise explanation of the workflow relationship, then organized parameter and return value sections. Every sentence earns its place with zero redundancy or 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?

For a preparation tool with read-only annotations and no output schema, the description is nearly complete. It explains the purpose, workflow relationship, parameters, and return structure. It could be slightly more complete by mentioning authentication requirements or error conditions, but covers the essential context well given the annotations.

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?

With 60% schema description coverage, the description adds minimal value beyond the schema. It lists parameters but provides no additional semantic context about format requirements (e.g., address validation, decimal precision), token symbol vs contract address distinctions, or practical examples. The schema already documents each parameter adequately.

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 specific action ('Prepare a transfer'), target resource ('to an external wallet address'), and output purpose ('Returns transfer details and a transfer_id for execution with tm_execute_transfer'). It explicitly distinguishes from its sibling tool tm_execute_transfer by indicating this is a preparation step rather than execution.

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?

The description provides explicit guidance on when to use this tool ('Prepare a transfer') versus its alternative ('for execution with tm_execute_transfer'). It establishes a clear workflow where this tool is used first to prepare, then the sibling tool executes. No other alternatives are needed given this specific two-step process.

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/jun229/tm-mcp-server'

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