Skip to main content
Glama

write_api_doc

Document HTTP, REST, or RPC API endpoints by specifying URL, method, request/response schemas; automatically index and push to git.

Instructions

Create an API endpoint document, index it, and auto-push to git.

    Side effects: creates api/{slug}.md in the docs path, indexes it into
    the vector store, and pushes to git if configured. Overwrites an
    existing file with the same title.

    Use for HTTP endpoints, REST APIs, and RPC schemas.
    Use write_architecture_doc() for system-level design decisions.
    Use write_best_practice() for API coding conventions.

    Args:
        title: Short title (e.g. "Create User Endpoint")
        endpoint: URL path (e.g. "/api/v1/users")
        method: HTTP method: GET, POST, PUT, PATCH, DELETE, etc.
        request_schema: Request body or query params description
        response_schema: Response body schema and status codes
        auth: Authentication/authorization requirements (optional)
        examples: Curl or code examples (optional)
        project: Target project name (optional)

    Returns:
        Saved filename, chunk count, and whether auto-push succeeded.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authNo
titleYes
methodYes
projectNo
endpointYes
examplesNo
request_schemaYes
response_schemaYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden and discloses key side effects: overwrites existing files, indexes into vector store, and auto-pushes to git. It also describes return values. However, it could mention potential failure modes for auto-push or permission requirements, but overall it is transparent given the context.

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?

The description is structured with clear sections: main purpose, side effects, usage guidelines, parameter list, and returns. It is front-loaded with the most critical information and every sentence adds value with no redundancy.

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

Completeness5/5

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

Given the 8 parameters (5 required) and no annotations, the description provides sufficient context for an agent to select the tool and fill parameters correctly. It covers side effects, alternatives, and return format, and the presence of an output schema further reduces the need to describe return values in detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides natural-language explanations for all 8 parameters (e.g., 'Short title', 'URL path', 'HTTP method'), adding meaning beyond the schema's type definitions. Though thorough, it could clarify the format for request_schema and response_schema more precisely.

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 'Create an API endpoint document, index it, and auto-push to git,' specifying the verb, resource, and actions. It also distinguishes from siblings by naming alternatives: write_architecture_doc for system-level decisions and write_best_practice for API coding conventions.

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

Usage Guidelines5/5

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

Explicitly says 'Use for HTTP endpoints, REST APIs, and RPC schemas' and provides alternatives for other document types, giving clear guidance on when to use this tool versus siblings.

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/dl4rce/flaiwheel'

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