Skip to main content
Glama

trust_compare

Compare trust scores for multiple wallet addresses to identify leaders, score gaps, and unregistered agents.

Instructions

Compare trust scores of up to 5 wallets side-by-side. See who leads, the score gap, and which agents are unregistered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletsYesArray of 2-5 wallet addresses to compare

Implementation Reference

  • The handler logic for the 'trust_compare' tool, which fetches wallet reputation, stamps, and agent info to compare them.
      async ({ wallets }) => {
        const { getDb } = require('./database');
        const db = getDb();
    
        const results = wallets.map(wallet => {
          const stamp = db.prepare(
            "SELECT tier FROM stamps WHERE wallet_address = ? AND revoked = 0 AND expires_at > datetime('now') ORDER BY CASE tier WHEN 'gold' THEN 1 WHEN 'silver' THEN 2 WHEN 'bronze' THEN 3 WHEN 'free' THEN 4 ELSE 5 END LIMIT 1"
          ).get(wallet);
    
          const agent = db.prepare(
            "SELECT id, name, endorsement_count FROM agents WHERE wallet_address = ? AND status = 'active' LIMIT 1"
          ).get(wallet);
    
          let reputation = { score: 0, tier_label: 'unknown' };
          if (agent) {
            const rep = computeReputation(agent.id);
            if (rep) reputation = rep;
          }
    
          return {
            wallet: wallet.slice(0, 6) + '...' + wallet.slice(-4),
            registered: !!agent,
            stamped: !!stamp,
            tier: stamp?.tier || 'none',
            name: agent?.name || null,
            score: reputation.score,
            label: agent ? reputation.tier_label : 'unknown',
            endorsements: agent?.endorsement_count || 0,
          };
        });
    
        results.sort((a, b) => b.score - a.score);
        const unregistered = results.filter(r => !r.registered);
    
        return {
          content: [{ type: 'text', text: JSON.stringify({
            comparison: results,
            leader: results[0],
            gap: results.length >= 2 ? results[0].score - results[results.length - 1].score : 0,
            unregistered_count: unregistered.length,
            nudge: unregistered.length > 0
              ? `${unregistered.length} agent(s) are not registered. They have 0 trust score. Register free: https://agentstamp.org/register`
              : null,
          }, null, 2) }],
        };
      }
    );
  • Registration of the 'trust_compare' tool, including the schema definition for the 'wallets' input parameter.
    server.tool(
      'trust_compare',
      'Compare trust scores of up to 5 wallets side-by-side. See who leads, the score gap, and which agents are unregistered.',
      {
        wallets: z.array(z.string()).min(2).max(5).describe('Array of 2-5 wallet addresses to compare'),
      },
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully reveals behavioral outputs: it calculates rankings ('who leads'), differential metrics ('score gap'), and registration status ('which agents are unregistered'). It lacks operational details like read-only status or rate limits.

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?

Two efficient sentences with zero waste. The first front-loads the core action (compare), while the second sentence earns its place by detailing specific analytical outputs rather than repeating structured data.

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?

Given a simple 1-parameter schema with 100% coverage and no output schema, the description adequately hints at return value structure (comparative rankings, gaps) through the second sentence. A perfect score would require an explicit output schema or explicit safety guarantees.

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 coverage is 100%, establishing baseline 3. The description mentions 'up to 5 wallets' which aligns with the schema's maxItems constraint, but doesn't add syntax details, format examples, or semantic context beyond what the schema already provides.

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 uses a specific verb ('Compare') with clear resource ('trust scores') and scope ('up to 5 wallets side-by-side'). The 'side-by-side' phrasing effectively distinguishes it from sibling tools like trust_check or get_agent_reputation which imply single-wallet lookups.

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?

The description implies usage through the constraint 'up to 5 wallets' and mentions the comparative output ('who leads', 'score gap'), but lacks explicit when-to-use guidance or named alternatives for single-wallet checks.

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/vinaybhosle/agentstamp'

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