Skip to main content
Glama

trust_compare

Compare trust scores for 2-5 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 tool 'trust_compare' is registered and implemented in src/mcp-server.js, which fetches agent/stamp data from the database and calculates relative trust rankings.
    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'),
      },
      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) }],
        };

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