Skip to main content
Glama

bridge_erc8004_lookup

Look up ERC-8004 on-chain agents to retrieve their AgentStamp trust score and identity verification, providing trust intelligence for AI agent interactions.

Instructions

Look up an ERC-8004 on-chain agent and get their AgentStamp trust score. Free. Returns on-chain identity + trust verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
erc8004_agent_idYesERC-8004 agent ID (numeric token ID from the Identity Registry)

Implementation Reference

  • The handler function for 'bridge_erc8004_lookup', which fetches on-chain agent details and AgentStamp link information to return a trust score and identity metadata.
    server.tool(
      'bridge_erc8004_lookup',
      'Look up an ERC-8004 on-chain agent and get their AgentStamp trust score. Free. Returns on-chain identity + trust verdict.',
      {
        erc8004_agent_id: z.string().regex(/^\d+$/, 'Must be a numeric token ID').describe('ERC-8004 agent ID (numeric token ID from the Identity Registry)'),
      },
      async ({ erc8004_agent_id }) => {
        try {
          const { getFullAgent } = require('./erc8004');
          const { getDb } = require('./database');
          const db = getDb();
    
          const onChain = await getFullAgent(erc8004_agent_id);
          if (!onChain.found) {
            return { content: [{ type: 'text', text: JSON.stringify({ success: false, error: 'Agent not found in ERC-8004 registry' }, null, 2) }] };
          }
    
          const link = db.prepare('SELECT * FROM erc8004_links WHERE erc8004_agent_id = ?').get(erc8004_agent_id);
    
          const result = {
            success: true,
            erc8004: {
              agent_id: onChain.agentId,
              owner: onChain.owner,
              agent_wallet: onChain.agentWallet,
              registration: onChain.registration,
            },
            agentstamp_linked: !!link,
            agentstamp_wallet: link?.agentstamp_wallet || null,
            trust_check_url: `https://agentstamp.org/api/v1/trust/check/erc8004:${erc8004_agent_id}`,
            link_url: link ? null : 'POST https://agentstamp.org/api/v1/bridge/erc8004/link',
          };
    
          if (link) {
            const agent = db.prepare("SELECT id, name FROM agents WHERE wallet_address = ? AND status = 'active' LIMIT 1").get(link.agentstamp_wallet);
            if (agent) {
              const rep = computeReputation(agent.id);
              result.trust_score = rep?.score || 0;
              result.trust_label = rep?.tier_label || 'new';
            }
          }
    
          return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
        } catch (err) {
          return { content: [{ type: 'text', text: JSON.stringify({ success: false, error: err.message }, null, 2) }] };
        }
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses cost ('Free') and return structure ('Returns on-chain identity + trust verdict'), but omits safety profile (e.g., read-only status), error handling, 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?

The description contains three efficient sentences with zero waste: action definition, cost disclosure, and return value summary. Information is appropriately front-loaded.

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 the simple single-parameter input and lack of output schema, the description adequately compensates by stating what the tool returns. It could improve by mentioning error behavior (e.g., invalid agent ID handling).

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 a baseline of 3. The description reinforces the 'ERC-8004' concept but adds no additional semantics regarding the numeric ID format or constraints beyond what the schema's pattern and description already provide.

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 uses a specific verb ('Look up') and resource ('ERC-8004 on-chain agent'), clearly defining the tool's scope. It differentiates from generic siblings like 'get_agent' by specifying the ERC-8004 standard, though it could better clarify distinctions versus 'bridge_erc8004_trust_check'.

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?

While it notes the tool is 'Free,' it provides no guidance on when to use this versus siblings like 'bridge_erc8004_trust_check' or 'trust_check', nor does it mention prerequisites or conditions for use.

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