Skip to main content
Glama

menese_quote

Get swap quotes, check balances, or view derived addresses across 19 blockchains through the Menese Protocol DeFi gateway.

Instructions

Multi-action tool: get swap quotes, show all derived addresses, or check a single chain balance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhat to fetch
chainNoBlockchain (required for balance/quote)
fromTokenNoSource token symbol (for quote)
toTokenNoDestination token symbol (for quote)
amountNoAmount to swap (for quote)

Implementation Reference

  • The handler implementation for the menese_quote tool.
    async ({ action, chain, fromToken, toToken, amount }) => {
      const identity = store.get();
      if (!identity) {
        return { content: [{ type: "text" as const, text: "No wallet configured. Use menese_setup first." }], isError: true };
      }
    
      if (action === "addresses") {
        const addresses = await cacheFetch(
          CacheKeys.addresses(identity.principal),
          TTL.ADDRESSES,
          () => getAllAddresses(config, identity.principal, resolveActorIdentity(store)),
        );
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify(addresses, bigIntReplacer, 2),
          }],
        };
      }
    
      if (action === "balance") {
        if (!chain) {
          return { content: [{ type: "text" as const, text: "chain is required for balance action." }], isError: true };
        }
        const result = await cacheFetch(
          CacheKeys.balance(identity.principal, chain),
          TTL.BALANCE,
          () => getChainBalance(config, identity.principal, chain),
        );
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify(result, bigIntReplacer, 2),
          }],
        };
      }
    
      // action === "quote"
      if (!chain || !fromToken || !toToken || !amount) {
        return {
          content: [{ type: "text" as const, text: "chain, fromToken, toToken, and amount are required for quote." }],
          isError: true,
        };
      }
      const quoteResult = await getSwapQuote(config, resolveActorIdentity(store), {
        chain, fromToken, toToken, amount,
      });
      return {
        content: [{
          type: "text" as const,
          text: JSON.stringify(quoteResult, bigIntReplacer, 2),
        }],
      };
    },
  • Input schema definition for the menese_quote tool.
    inputSchema: {
      action: z.enum(["balance", "addresses", "quote"]).describe("What to fetch"),
      chain: z.enum(SUPPORTED_CHAINS as unknown as [string, ...string[]]).optional()
        .describe("Blockchain (required for balance/quote)"),
      fromToken: z.string().optional().describe("Source token symbol (for quote)"),
      toToken: z.string().optional().describe("Destination token symbol (for quote)"),
      amount: z.string().optional().describe("Amount to swap (for quote)"),
    },
  • The tool registration for menese_quote.
    server.registerTool(
      "menese_quote",
      {
        description:
          "Multi-action tool: get swap quotes, show all derived addresses, or check a single chain balance.",
        inputSchema: {
          action: z.enum(["balance", "addresses", "quote"]).describe("What to fetch"),
          chain: z.enum(SUPPORTED_CHAINS as unknown as [string, ...string[]]).optional()
            .describe("Blockchain (required for balance/quote)"),
          fromToken: z.string().optional().describe("Source token symbol (for quote)"),
          toToken: z.string().optional().describe("Destination token symbol (for quote)"),
          amount: z.string().optional().describe("Amount to swap (for quote)"),
        },
      },
      async ({ action, chain, fromToken, toToken, amount }) => {
        const identity = store.get();
        if (!identity) {
          return { content: [{ type: "text" as const, text: "No wallet configured. Use menese_setup first." }], isError: true };
        }
    
        if (action === "addresses") {
          const addresses = await cacheFetch(
            CacheKeys.addresses(identity.principal),
            TTL.ADDRESSES,
            () => getAllAddresses(config, identity.principal, resolveActorIdentity(store)),
          );
          return {
            content: [{
              type: "text" as const,
              text: JSON.stringify(addresses, bigIntReplacer, 2),
            }],
          };
        }
    
        if (action === "balance") {
          if (!chain) {
            return { content: [{ type: "text" as const, text: "chain is required for balance action." }], isError: true };
          }
          const result = await cacheFetch(
            CacheKeys.balance(identity.principal, chain),
            TTL.BALANCE,
            () => getChainBalance(config, identity.principal, chain),
          );
          return {
            content: [{
              type: "text" as const,
              text: JSON.stringify(result, bigIntReplacer, 2),
            }],
          };
        }
    
        // action === "quote"
        if (!chain || !fromToken || !toToken || !amount) {
          return {
            content: [{ type: "text" as const, text: "chain, fromToken, toToken, and amount are required for quote." }],
            isError: true,
          };
        }
        const quoteResult = await getSwapQuote(config, resolveActorIdentity(store), {
          chain, fromToken, toToken, amount,
        });
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify(quoteResult, bigIntReplacer, 2),
          }],
        };
      },
    );
Behavior2/5

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

With no annotations provided, the description carries full burden but discloses almost no behavioral traits. It does not indicate whether operations are read-only, what data format is returned, rate limits, or whether 'quote' actions have side effects like cache updates or transaction preparation.

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?

Single sentence efficiently front-loads the multi-action nature. The colon-separated list structure clearly delineates the three modes. Minor redundancy with 'Multi-action tool' prefix (implied by the action parameter), but otherwise zero waste.

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 the tool's complexity (three distinct operational modes, 19 chain options, no output schema, no annotations), the description is minimally viable but incomplete. It omits return value descriptions, authentication requirements, and critical behavioral context needed for a financial/crypto tool handling balances and quotes.

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?

While schema coverage is 100% (baseline 3), the description adds valuable semantic grouping: it maps 'quote' action to swap functionality (linking to fromToken/toToken/amount), 'balance' to chain-specific queries, and clarifies that 'addresses' refers to derived addresses. This contextualizes the action enum beyond the schema's generic 'What to fetch'.

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 enumerates the three distinct operations (get swap quotes, show derived addresses, check single chain balance) with specific verbs and resources. It implicitly distinguishes from sibling 'menese_swap' (quotes vs execution) and 'menese_balance' (single chain vs potentially multi-chain), though 'menese_addresses' functionality appears unique to this tool.

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?

No explicit guidance on when to use this multi-action tool versus specialized siblings (menese_balance, menese_swap). The agent cannot determine if this is a convenience fallback or if specific actions here offer different capabilities than the dedicated tools.

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/Aboodtt404/mcp-menese-sdk'

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