Skip to main content
Glama

compare

Compare services side by side using quality grades and recommendations. Sort results by quality, price, or speed for informed decisions.

Instructions

Compare services side by side with quality grades and recommendations (costs $0.02 USDC on Base)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capabilityYesService capability to compare
sort_byNoSort order

Implementation Reference

  • server.js:26-26 (registration)
    Registration of the 'compare' tool in ListToolsRequestSchema, defining its name, description, and input schema (requiring 'capability' string, optional 'sort_by' enum).
    { name: 'compare', description: 'Compare services side by side with quality grades and recommendations (costs $0.02 USDC on Base)', inputSchema: { type: 'object', properties: { capability: { type: 'string', description: 'Service capability to compare' }, sort_by: { type: 'string', enum: ['quality', 'price', 'speed'], description: 'Sort order' } }, required: ['capability'] } },
  • server.js:34-70 (handler)
    Main CallToolRequestSchema handler. The 'compare' tool is grouped with other paid tools (discover, find, market_report, market_opportunity). It does not have a dedicated handler; instead it falls through to lines 57-69 where it returns a payment-required message instructing the user to call /compare directly with an x402-enabled client.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      const freeEndpoints = { stats: '/stats', quality: '/quality', protocols: '/protocols', prices: '/prices', trends: '/trends' };
    
      if (freeEndpoints[name]) {
        const resp = await fetch(BASE_URL + freeEndpoints[name]);
        const data = await resp.json();
        return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
      }
    
      if (name === 'agent_check') {
        const resp = await fetch(`${BASE_URL}/agent/check?wallet=${args.wallet}${args.category ? '&category=' + args.category : ''}`);
        const data = await resp.json();
        return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
      }
    
      if (name === 'submit') {
        const resp = await fetch(`${BASE_URL}/submit`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(args) });
        const data = await resp.json();
        return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
      }
    
      const paidEndpoints = { discover: `/discover?q=${encodeURIComponent(args.query || '')}`, find: null, compare: null, market_report: '/market/report', market_opportunity: '/market/opportunity' };
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({
            message: `This tool requires x402 payment (USDC on Base). Call ${BASE_URL}/${name.replace('_', '/')} directly with an x402-enabled client.`,
            endpoint: BASE_URL + (name === 'discover' ? `/discover?q=${encodeURIComponent(args.query || '')}` : name === 'find' ? '/find' : name === 'compare' ? '/compare' : `/${name.replace('_', '/')}`),
            payment_required: true,
            how_to_pay: 'npm install @x402/fetch && see https://github.com/cinderwright-ai/cinderwright-api/blob/main/DEMO.md'
          }, null, 2)
        }]
      };
    });
  • Input schema for 'compare' tool: requires 'capability' (string), optional 'sort_by' (enum: quality, price, speed).
    { name: 'compare', description: 'Compare services side by side with quality grades and recommendations (costs $0.02 USDC on Base)', inputSchema: { type: 'object', properties: { capability: { type: 'string', description: 'Service capability to compare' }, sort_by: { type: 'string', enum: ['quality', 'price', 'speed'], description: 'Sort order' } }, required: ['capability'] } },
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses a significant behavioral trait: the tool costs $0.02 USDC on Base. However, it does not state whether it is read-only, destructive, or any other behavioral aspects. The cost disclosure is valuable but incomplete.

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?

A single, well-structured sentence that front-loads the purpose and includes both the output and a key constraint (cost). No redundancy or unnecessary words.

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 simple two-parameter tool with no output schema, the description is fairly complete: it explains the action, what the user gets (quality grades and recommendations), and a critical constraint (cost). It could add brief guidance on when to use or how results are formatted, but overall it covers the essentials.

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%, so the description adds no extra meaning beyond the schema's parameter descriptions. For 'capability' and 'sort_by', the schema already explains them; the description does not elaborate further.

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 verb 'compare', the resource 'services', and the output includes 'quality grades and recommendations'. This distinguishes it from siblings like 'quality' which likely returns a single service's quality, or 'find' which may search without comparison.

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?

No explicit guidance on when to use this tool vs alternatives. The description implies it is for side-by-side comparison with a cost, but does not mention when not to use it or suggest specific siblings. Usage context is implied but not clearly defined.

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/cinderwright-ai/cinderwright-api'

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