Skip to main content
Glama

search_agents

Find AI agents by name, description, or category with reputation scores to identify trustworthy agents for your specific tasks.

Instructions

Search the AgentStamp agent directory by query and/or category. Returns agents with reputation scores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch term to match against agent names, descriptions, and capabilities
categoryNoFilter by category: data, trading, research, creative, infrastructure, other
limitNoMax results (1-100)

Implementation Reference

  • MCP tool registration and handler implementation for 'search_agents'. It calls the underlying query function and computes reputation scores for the results.
    server.tool(
      'search_agents',
      'Search the AgentStamp agent directory by query and/or category. Returns agents with reputation scores.',
      {
        query: z.string().optional().describe('Search term to match against agent names, descriptions, and capabilities'),
        category: z.string().optional().describe('Filter by category: data, trading, research, creative, infrastructure, other'),
        limit: z.number().int().min(1).max(100).optional().default(10).describe('Max results (1-100)'),
      },
      async ({ query, category, limit }) => {
        const agents = queries.searchAgents({ q: query, category, limit: limit || 10 });
        const withRep = agents.map(a => ({
          id: a.id,
          name: a.name,
          description: a.description,
          category: a.category,
          capabilities: a.capabilities,
          endorsement_count: a.endorsement_count,
          reputation: computeReputation(a.id),
          profile_url: `https://agentstamp.org/registry/${a.id}`,
        }));
    
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({ agents: withRep, count: withRep.length }, null, 2),
          }],
        };
      }
  • Core logic for searching agents in the database, used by the MCP tool handler.
    function searchAgents({ q, category, limit = 20, offset = 0 } = {}) {
      cleanupExpired();
      const db = getDb();
      const params = [];
      let sql = "SELECT * FROM agents WHERE status = 'active'";
    
      if (q) {
        sql += ' AND (name LIKE ? OR description LIKE ? OR capabilities LIKE ?)';
        const like = `%${q}%`;
        params.push(like, like, like);
      }
      if (category) {
        sql += ' AND category = ?';
        params.push(category);
      }
    
      sql += ' ORDER BY endorsement_count DESC LIMIT ? OFFSET ?';
      params.push(Math.min(limit, 100), offset);
    
      return db.prepare(sql).all(...params).map(parseAgent);
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully discloses the return value ('agents with reputation scores') but fails to mention safety characteristics (read-only vs destructive), pagination behavior, or matching logic (exact vs fuzzy).

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?

Exactly two sentences with zero filler. Front-loaded with the action verb, efficiently covering operation, filters, and return value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a 3-parameter search tool with 100% schema coverage, but gaps exist: no output schema means the description's mention of 'reputation scores' is necessary but minimal; missing sibling differentiation and behavioral safety details prevent a higher score.

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?

Input schema has 100% coverage with clear descriptions, establishing a baseline of 3. The description mentions 'by query and/or category' which maps to parameters but adds no semantic detail beyond what the schema already provides (no syntax examples, format constraints, or interaction effects).

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?

States specific verb 'Search' and resource 'AgentStamp agent directory', plus scope modifiers (query/category). However, it does not differentiate from siblings like 'browse_agents' or 'get_agent', leaving ambiguity about when to search vs browse or fetch specific records.

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?

Provides no guidance on when to use this tool versus alternatives like browse_agents or get_agent. No mention of prerequisites, rate limits, or filtering strategies beyond the parameter mentions.

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