Skip to main content
Glama

search_endpoints

Find API endpoints using natural language queries to locate semantically similar endpoints for your integration needs.

Instructions

Search for API endpoints using natural language. Returns semantically similar endpoints based on the query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language description of what you're looking for
api_idNoOptional: limit search to a specific API
top_kNoNumber of results to return (default: 5)

Implementation Reference

  • The _search_endpoints method in MCPTools handles the execution of the search_endpoints tool by delegating to a vector_searcher.
    async def _search_endpoints(self, args: dict[str, Any]) -> ToolResult:
        """Search for endpoints."""
        query = args["query"]
        api_id = args.get("api_id")
        top_k = args.get("top_k", 5)
    
        results = self.vector_searcher.search(query, api_id=api_id, top_k=top_k)
    
        return ToolResult(
            success=True,
            data={
                "query": query,
                "results": [
                    {
                        "endpoint_id": r.endpoint_id,
                        "api_id": r.api_id,
                        "path": r.path,
                        "method": r.method,
                        "summary": r.summary,
                        "score": round(r.score, 3),
                    }
                    for r in results
                ],
                "count": len(results),
            },
  • The SearchEndpointsInput Pydantic model defines the input schema for the search_endpoints tool.
    class SearchEndpointsInput(BaseModel):
        """Input for search_endpoints tool."""
    
        query: str = Field(
            ...,
            description="Natural language search query",
            min_length=1,
            max_length=500,
        )
        api_id: str | None = Field(
            None,
            description="Optional: limit search to a specific API",
        )
  • The search_endpoints tool is defined in the list of available tools provided by the MCP server.
    "name": "search_endpoints",
    "description": "Search for API endpoints using natural language. "
    "Returns semantically similar endpoints based on the query.",
    "inputSchema": {
        "type": "object",
        "properties": {
            "query": {
                "type": "string",
                "description": "Natural language description of what you're looking for",
            },
            "api_id": {
                "type": "string",
                "description": "Optional: limit search to a specific API",
            },
            "top_k": {
                "type": "integer",
Behavior3/5

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

With no annotations provided, the description carries full disclosure burden. It successfully explains the matching logic (semantic similarity) but omits operational details like auth requirements, rate limits, read-only status, error behaviors, or the structure/format of returned endpoint objects.

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 with zero waste. The first establishes the action and input method; the second establishes the return value. Information is front-loaded and 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 the tool's simple 3-parameter structure with complete schema documentation and no output schema, the description is sufficiently complete. It conceptually explains the return value (semantically similar endpoints), though it could benefit from describing the output structure or error scenarios.

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 description coverage is 100%, establishing a baseline of 3. The description mentions 'natural language' which maps to the query parameter, but does not augment the schema with additional guidance like example queries, format constraints, or the relationship between api_id filtering and search scope.

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 clearly states the action (search), resource (API endpoints), and method (natural language/semantic similarity). It implicitly distinguishes from list_apis via the 'natural language' and 'semantically similar' qualifiers, but does not explicitly reference sibling tools to clarify when to use each.

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?

The description implies usage context through 'natural language' (suggesting use when exact endpoint names are unknown), but provides no explicit when-to-use guidance, exclusions, or named alternatives like list_apis. The agent must infer when semantic search is preferred over listing.

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/nk3750/jitapi'

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