Skip to main content
Glama

agentfolio_search

Search for AI agents by skill, name, or keyword. Filter by trust score and category to find verified agent profiles.

Instructions

Search for AI agents on AgentFolio by skill, name, or keyword. Filter by minimum trust score. Returns matching agent profiles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch query — matches name, bio, and skills
skillNoFilter by specific skill name
categoryNoFilter by skill category
min_trustNoMinimum trust score (0-100+). Default: 0
limitNoMax results to return. Default: 10

Implementation Reference

  • Input schema for the agentfolio_search tool, defining parameters: query (string), skill (string), category (string), min_trust (number), limit (number).
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "Search query — matches name, bio, and skills",
        },
        skill: {
          type: "string",
          description: "Filter by specific skill name",
        },
        category: {
          type: "string",
          description: "Filter by skill category",
        },
        min_trust: {
          type: "number",
          description: "Minimum trust score (0-100+). Default: 0",
        },
        limit: {
          type: "number",
          description: "Max results to return. Default: 10",
        },
      },
    },
  • Handler for agentfolio_search. Fetches all profiles from /api/profiles, then performs client-side filtering by query (name/bio/skills), min_trust, skill, and category. Returns matching results up to the limit.
    case "agentfolio_search": {
      // /api/search is currently unavailable — fall back to client-side filtering of /api/profiles
      const profilesData = await api("/profiles");
      const allProfiles = profilesData.profiles || [];
      const query = (args.query || "").toLowerCase();
      const minTrust = args.min_trust || 0;
      const limit = args.limit || 10;
    
      let filtered = allProfiles;
      if (query) {
        filtered = filtered.filter((p) => {
          const name = (p.name || "").toLowerCase();
          const bio = (p.bio || p.description || "").toLowerCase();
          const skills = (p.skills || [])
            .map((s) => (typeof s === "string" ? s : s.name || "").toLowerCase())
            .join(" ");
          return name.includes(query) || bio.includes(query) || skills.includes(query);
        });
      }
      if (minTrust > 0) {
        filtered = filtered.filter((p) => (p.trustScore || 0) >= minTrust);
      }
      if (args.skill) {
        const sk = args.skill.toLowerCase();
        filtered = filtered.filter((p) =>
          (p.skills || []).some((s) =>
            (typeof s === "string" ? s : s.name || "").toLowerCase().includes(sk)
          )
        );
      }
      if (args.category) {
        const cat = args.category.toLowerCase();
        filtered = filtered.filter((p) =>
          (p.skills || []).some(
            (s) => typeof s === "object" && (s.category || "").toLowerCase().includes(cat)
          )
        );
      }
    
      return JSON.stringify(
        {
          query: args.query || "",
          count: filtered.length,
          results: filtered.slice(0, limit),
          note: "Search performed client-side against agent directory. Some profile fields may be limited.",
          totalRegistered: profilesData.total || 0,
        },
        null,
        2
      );
    }
  • src/index.js:79-80 (registration)
    Tool registration entry in the TOOLS array. Defines name 'agentfolio_search' and its description.
    {
      name: "agentfolio_search",
  • The api() helper function used by the handler to make HTTP requests to the AgentFolio API backend.
    async function api(path, opts = {}) {
      const url = `${API_BASE}${path}`;
      const res = await fetch(url, {
        headers: { "Content-Type": "application/json", ...opts.headers },
        ...opts,
      });
      if (!res.ok) {
        const body = await res.text().catch(() => "");
        throw new Error(`AgentFolio API ${res.status}: ${body}`);
      }
      // Guard against HTML error pages returned with 200
      const ct = res.headers.get("content-type") || "";
      if (!ct.includes("application/json")) {
        const body = await res.text().catch(() => "");
        if (body.includes("<!DOCTYPE") || body.includes("<html")) {
          throw new Error(`AgentFolio API returned HTML instead of JSON for ${path}`);
        }
      }
      return res.json();
    }
Behavior2/5

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

With no annotations, the description carries full burden. It does not disclose side effects (none expected), but also omits behavior like result ordering, pagination, or performance characteristics. Only states it returns matching profiles.

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?

Two sentences, zero wasted words, front-loaded with verb 'Search' and resource 'AI agents'. Efficiently conveys purpose.

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?

For a search tool with 5 parameters and no output schema, the description provides adequate overview but lacks details on return format, pagination behavior, or default ordering. Siblings don't clarify output structure.

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%, so each parameter is well-described. The description adds limited extra context (e.g., 'query matches name, bio, and skills'), which is already implied by schema. Baseline 3 is appropriate.

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?

The description clearly states the tool searches for AI agents by skill, name, or keyword with filtering, distinguishing it from siblings like 'agentfolio_list_agents' (likely list all) and 'agentfolio_lookup' (single lookup).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use (searching/filtering agents) but does not explicitly say when not to use or name alternatives, though sibling names provide some context.

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/0xbrainkid/agentfolio-mcp-server'

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