Skip to main content
Glama
anuoua

swagger-doc-explorer-mcp

by anuoua

Search API Spec

swagger_search
Read-onlyIdempotent

Find API endpoints, schemas, and properties matching a search term across a loaded OpenAPI specification. Locate relevant documentation quickly by querying paths, summaries, operationIds, tags, and schema names.

Instructions

Search across all endpoints and schemas in a loaded OpenAPI spec for a given query string.

Searches through endpoint paths, operation summaries, operationIds, descriptions, tags, schema names, and property names.

Args:

  • spec_name (string): Name of the previously loaded spec

  • query (string): Search term to find in endpoint paths, summaries, operationIds, tags, schema names, and property descriptions

Returns: { "total": number, // Total number of matches "results": [ { "type": "endpoint" | "schema" | "property", "path": string, // URL path (for endpoints) "method": string, // HTTP method (for endpoints) "schemaName": string, // Schema name (for schemas/properties) "propertyName": string, // Property name (for properties) "match": string, // Human-readable match description "summary": string // Brief description } ] }

Examples:

  • Use when: "Search for anything about pets" -> params with spec_name="", query="pet"

  • Use when: "Find endpoints related to users" -> params with spec_name="", query="user"

Error Handling:

  • Returns error if the spec name has not been loaded

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term to find in endpoint paths, summaries, operationIds, tags, schema names, and property descriptions
spec_nameYesName of the previously loaded OpenAPI/Swagger spec (use swagger_list_loaded to see available names)
Behavior5/5

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

Annotations already declare the tool read-only and idempotent. The description goes further by detailing the search scope (paths, summaries, tags, etc.), the exact return JSON structure, and error behavior for unloaded specs, giving agents a complete behavioral picture.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (summary, search scope, Args, Returns, Examples, Error Handling) and front-loaded with the core purpose. The detailed return schema and examples justify the length, with no significant 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?

Despite lacking an output schema, the description fully specifies the return format, error handling, and usage examples. The search scope is comprehensive, and the 100% parameter schema and read-only annotations cover the remaining context. Nothing critical is missing.

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?

Both parameters are already fully described in the schema (100% coverage), including a cross-reference to swagger_list_loaded for spec names. The description's Args section largely restates this information without adding meaningful new parameter semantics, so the baseline score of 3 applies.

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 opens with 'Search across all endpoints and schemas in a loaded OpenAPI spec', clearly stating a specific verb (search) and resource (endpoints and schemas). It also enumerates the exact fields searched (paths, summaries, operationIds, etc.), making it distinct from sibling list/get/load tools.

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?

Provides explicit 'Use when' examples ('Search for anything about pets' → query='pet') that clarify intended scenarios. It doesn't explicitly exclude alternatives like swagger_list_paths, but the search context is well established.

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/anuoua/swagger-doc-explorer-mcp'

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