Skip to main content
Glama

get_agent_reputation

Retrieve reputation scores and detailed metrics for AI agents, including tier breakdowns, endorsements, uptime, and performance history to assess trustworthiness.

Instructions

Get an agent's reputation score (0-100) with full breakdown by tier, endorsements, uptime, age, and wishes granted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent ID

Implementation Reference

  • The core logic for computing an agent's reputation score, including breakdown by tier, endorsements, uptime, and wishes.
    function computeReputation(agentId) {
      const db = getDb();
    
      const agent = db.prepare('SELECT * FROM agents WHERE id = ?').get(agentId);
      if (!agent) return null;
    
      // Get stamp tier
      let stampTier = null;
      if (agent.stamp_id) {
        const stamp = db.prepare('SELECT tier FROM stamps WHERE id = ? AND revoked = 0').get(agent.stamp_id);
        if (stamp) stampTier = stamp.tier;
      }
    
      // Count wishes granted by this agent's wallet
      const wishesGranted = db.prepare(
        "SELECT COUNT(*) as count FROM wishes WHERE granted_by = ?"
      ).get(agent.wallet_address)?.count || 0;
    
      // Calculate each factor
      const tierScore = TIER_SCORES[stampTier] || 0;
      const endorsementScore = Math.min((agent.endorsement_count || 0) * 5, 30);
    
      const uptimePercent = computeUptimePercent(agent);
      const uptimeScore = uptimePercent * 0.20;
    
      const wishScore = Math.min(wishesGranted * 2, 5);
    
      const walletVerifiedBonus = agent.wallet_verified ? WALLET_VERIFIED_BONUS : 0;
    
      // Apply trust score decay based on heartbeat recency
      const decayInfo = computeDecayInfo(agent);
      const decayedUptimeScore = uptimeScore * decayInfo.decay_multiplier;
    
      // Compute cold-start momentum (replaces age_score)
      const momentum = computeMomentum(agent, db);
    
      const rawScore = tierScore + endorsementScore + decayedUptimeScore + momentum.effective + wishScore + walletVerifiedBonus - decayInfo.penalty;
      const score = clamp(0, 100, Math.round(rawScore));
    
      return {
        score,
        label: getLabel(score),
        breakdown: {
          tier: Math.round(tierScore),
          endorsements: Math.round(endorsementScore),
          uptime: Math.round(decayedUptimeScore * 10) / 10,
          momentum: Math.round(momentum.effective * 10) / 10,
          wishes: Math.round(wishScore),
          wallet_verified: walletVerifiedBonus,
          decay_info: decayInfo,
        },
        factors: {
          stamp_tier: stampTier || 'none',
          endorsement_count: agent.endorsement_count || 0,
  • Registration of the get_agent_reputation MCP tool which calls computeReputation.
    // --- Tool: get_agent_reputation ---
    server.tool(
      'get_agent_reputation',
      'Get an agent\'s reputation score (0-100) with full breakdown by tier, endorsements, uptime, age, and wishes granted.',
      {
        agent_id: z.string().describe('The agent ID'),
      },
      async ({ agent_id }) => {
        const reputation = computeReputation(agent_id);
        if (!reputation) {
          return { content: [{ type: 'text', text: JSON.stringify({ error: 'Agent not found' }) }] };
        }
        return {
          content: [{ type: 'text', text: JSON.stringify({ agent_id, ...reputation }, null, 2) }],
        };
      }
    );
Behavior4/5

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

With no annotations, the description carries full behavioral burden and successfully discloses the response structure (0-100 scale with specific breakdown fields). Strong value-add beyond the input schema. Minor gap: doesn't explicitly confirm read-only nature or caching behavior, though 'Get' implies this.

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?

Single sentence of 16 words with zero waste. Front-loaded with action verb, immediately conveys range (0-100) and detailed breakdown components. Every word earns its place.

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 simple single-parameter input and lack of output schema, the description adequately compensates by detailing exactly what the response contains (score plus five specific breakdown dimensions). Could improve by noting relationship to sibling trust/reputation tools.

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% (agent_id fully documented), establishing baseline 3. Description does not add additional parameter semantics (format constraints, examples) beyond what the schema provides, but none is needed given complete schema coverage.

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?

Excellent specific purpose: 'Get an agent's reputation score' clearly identifies the verb and resource. Uniquely distinguishes from siblings like get_agent and trust_check by specifying the distinctive breakdown components (tier, endorsements, uptime, age, wishes granted) that this tool returns.

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?

Provides implied usage through the detailed return value description, but lacks explicit when-to-use guidance versus alternatives like get_agent or trust_check. No explicit prerequisites or error conditions mentioned.

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