Skip to main content
Glama

erc8004_get_reputation

Retrieve ERC-8004 agent reputation data including score, count, and decimals. Filter by optional tags to analyze on-chain agent performance metrics.

Instructions

Get ERC-8004 agent reputation summary (score, count, decimals).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesOn-chain agent ID (uint256)
tag1NoOptional tag1 filter
tag2NoOptional tag2 filter

Implementation Reference

  • Handler function that executes the API request for the erc8004_get_reputation tool.
      async (args) => {
        const params = new URLSearchParams();
        if (args.tag1) params.set('tag1', args.tag1);
        if (args.tag2) params.set('tag2', args.tag2);
        const qs = params.toString();
        const result = await apiClient.get(`/v1/erc8004/agent/${args.agent_id}/reputation${qs ? `?${qs}` : ''}`);
        return toToolResult(result);
      },
    );
  • Zod schema defining the input arguments for the tool.
    {
      agent_id: z.string().describe('On-chain agent ID (uint256)'),
      tag1: z.string().optional().describe('Optional tag1 filter'),
      tag2: z.string().optional().describe('Optional tag2 filter'),
    },
  • Registration function that defines the tool in the MCP server.
    export function registerErc8004GetReputation(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void {
      server.tool(
        'erc8004_get_reputation',
        withWalletPrefix('Get ERC-8004 agent reputation summary (score, count, decimals).', walletContext?.walletName),
        {
          agent_id: z.string().describe('On-chain agent ID (uint256)'),
          tag1: z.string().optional().describe('Optional tag1 filter'),
          tag2: z.string().optional().describe('Optional tag2 filter'),
        },
        async (args) => {
          const params = new URLSearchParams();
          if (args.tag1) params.set('tag1', args.tag1);
          if (args.tag2) params.set('tag2', args.tag2);
          const qs = params.toString();
          const result = await apiClient.get(`/v1/erc8004/agent/${args.agent_id}/reputation${qs ? `?${qs}` : ''}`);
          return toToolResult(result);
        },
      );
    }

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/minhoyoo-iotrust/WAIaaS'

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