Skip to main content
Glama

trust_check

Verify wallet address trust status with a single call. Returns trust verdict, reputation score, tier, and profile information for registered agents.

Instructions

Single-call trust verdict for any wallet address. Returns whether the agent is trusted, their score, tier, and profile info. Unregistered agents get trusted: false with a registration CTA.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_addressYesWallet address to check trust status for

Implementation Reference

  • The implementation of the trust_check MCP tool in src/mcp-server.js. It takes a wallet_address, queries a local SQLite database for stamp and agent info, computes reputation, and returns the trust verdict.
    server.tool(
      'trust_check',
      'Single-call trust verdict for any wallet address. Returns whether the agent is trusted, their score, tier, and profile info. Unregistered agents get trusted: false with a registration CTA.',
      {
        wallet_address: z.string().describe('Wallet address to check trust status for'),
      },
      async ({ wallet_address }) => {
        const { getDb } = require('./database');
        const db = getDb();
    
        const stamp = db.prepare(
          "SELECT id, tier, expires_at 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_address);
    
        const agent = db.prepare(
          "SELECT id, name, category, endorsement_count, status, registered_at FROM agents WHERE wallet_address = ? AND status = 'active' LIMIT 1"
        ).get(wallet_address);
    
        if (!stamp && !agent) {
          return { content: [{ type: 'text', text: JSON.stringify({
            trusted: false,
            score: 0,
            tier: null,
            label: 'unknown',
            message: 'This wallet has no AgentStamp identity. The agent is unverified and not in the public registry.',
            action: {
              register: 'https://agentstamp.org/register',
              message: 'Register for free in 60 seconds to become trusted and discoverable.',
            },
          }, null, 2) }] };
        }
    
        let reputation = { score: 0, tier_label: 'new', breakdown: null };
        if (agent) {
          const rep = computeReputation(agent.id);
          if (rep) reputation = rep;
        }
    
        const trusted = reputation.score >= 10 || !!stamp;
    
        return {
          content: [{ type: 'text', text: JSON.stringify({
            trusted,
            score: reputation.score,
            tier: stamp?.tier || 'none',
            label: reputation.tier_label,
            agent: agent ? {
              id: agent.id,
              name: agent.name,
              category: agent.category,
              endorsements: agent.endorsement_count,
              profile_url: `https://agentstamp.org/registry/${agent.id}`,
            } : null,
            stamp: stamp ? { id: stamp.id, tier: stamp.tier, expires_at: stamp.expires_at } : 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