Skip to main content
Glama
josephsenior

mcp-public-apis

by josephsenior

generate_snippet

Generates curl, fetch, and axios code snippets for any API endpoint. Supports optional API key and custom headers.

Instructions

Generates ready-to-use curl, fetch, and axios code snippets for calling a given API endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe API endpoint URL
apiKeyNoOptional API key to include
apiKeyParamNoQuery parameter name for the API key (default: "api_key")
headersNoAdditional headers as key-value pairs
Behavior2/5

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

With no annotations provided, the description carries full burden. It only states the generation action without disclosing any side effects, error behavior, or constraints (e.g., rate limits, authentication needs, or idempotency).

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, no filler, directly communicates the tool's output. Every word earns its place.

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?

Given no output schema and 4 parameters including a nested object, the description is minimal but covers the core function. Lacks context about return format, error handling, or usage hints needed for an API client tool.

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?

Parameter descriptions in the schema cover 100% of the 4 parameters, so baseline is 3. The description adds no extra meaning beyond 'for calling a given API endpoint' which is already implied by the parameter names.

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 generates ready-to-use code snippets in three specific formats (curl, fetch, axios) for a given API endpoint, making the purpose unambiguous and distinct from sibling tools like compare_apis or search_apis.

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?

The description provides no guidance on when to use this tool versus alternatives like get_api_detail or probe_api, nor does it specify conditions or exclusions.

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/josephsenior/pblic-apis-mcp-server'

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