Skip to main content
Glama
josenieto

mcp-api-pentest

by josenieto

parse_api_spec

Reads a local OpenAPI/Swagger file, detects JSON or YAML, extracts routes and methods, and strips verbose text to reduce LLM token usage by up to 70%.

Instructions

Reads a local OpenAPI/Swagger file (JSON or YAML), auto-detects format, and selectively extracts routes and methods. Strips verbose descriptions to save up to 70% of LLM tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spec_pathYes

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 disclosure burden. It reveals several non-obvious behaviors: auto-detects format, selectively extracts routes/methods, and strips verbose descriptions to save tokens. 'Reads' implies non-destructive, though it doesn't explicitly state that the source file is not modified.

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 two tight sentences. The first sentence states the action and resource; the second adds the token-saving benefit. Every word earns its place, and there is no redundant or vague filler.

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 has only one simple parameter and an output schema exists, the description is largely sufficient. It explains the core behavior, formats, and purpose. However, 'selectively extracts' is somewhat vague regarding selection criteria, and failure/error handling is not mentioned, though that is not strictly required.

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?

The input schema has only one parameter (spec_path) with zero schema description coverage. The description hints that spec_path is a local file path ('Reads a local... file') but never explicitly says the parameter is the path or discusses accepted path formats or edge cases. It adds some meaning but not enough to fully compensate for the schema gap.

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 uses a specific verb ('Reads') and identifies the exact resource ('local OpenAPI/Swagger file'), the input formats ('JSON or YAML'), and the core output ('routes and methods'). It also differentiates from siblings by focusing on parsing/extracting from an API spec rather than other operations.

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 clearly implies when to use this tool: when you need to read and extract routes/methods from a local OpenAPI or Swagger file. It provides context about format auto-detection and token savings, but it does not explicitly name alternatives or state when not to use it.

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/josenieto/mcp-api-pentest'

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