Skip to main content
Glama

detect_format

Read-only

Identify a document: OpenAPI (Swagger 2.0 vs 3.x), AsyncAPI, Arazzo, JSON Schema, APIs.json, MCP, an agent SKILL.md, an Overlay or a ruleset — and how many catalog rules and which named profiles apply.

Input Schema

NameRequiredDescriptionDefault
contextNoOptional: why you are asking. One sentence — the task you are trying to complete, or what you expect to get back. Never included in the answer and never used to rank; it is read only when a result turns out to be wrong, which is when knowing the intent is what makes the report actionable.
documentYesThe API description to operate on — OpenAPI, AsyncAPI, Arazzo or JSON Schema. A YAML/JSON string or an already-parsed object; both are accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), so the description's job is to add context — and it does, disclosing that the result includes catalog rule counts and named profile applicability, which is otherwise unknowable. It stops short of saying how ambiguity (e.g. Swagger 2.0 vs 3.x near-miss) or unrecognized input is reported.

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?

A single front-loaded sentence with no filler; every clause carries content. The em-dash tail introducing rule counts and profiles is slightly buried but still 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?

With no output schema, the description must carry the return contract, and it only gestures at it (format, rule count, profiles) without shape or failure semantics. For a low-risk read-only detection tool this is close to sufficient, but an agent cannot predict the response structure or what happens on an ambiguous/unknown document.

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% and both parameters are documented in the schema, so the baseline of 3 applies. The description's format list roughly mirrors what `document` may contain (YAML/JSON string or parsed object) but adds no new syntax, sizing or validation detail beyond the schema.

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?

Specific verb ("Identify") plus resource ("a document") with a fully enumerated taxonomy of possible outcomes (OpenAPI/Swagger 2.0 vs 3.x, AsyncAPI, Arazzo, JSON Schema, APIs.json, MCP, SKILL.md, Overlay, ruleset). It also states what comes back (catalog rule count, applicable named profiles), which distinguishes it from siblings like validate_api, api_scorecard and api_coverage that act on an already-identified document.

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?

Usage is only implied: laying out the full format taxonomy signals "call this when the format is unknown", and the `context` parameter's schema text reinforces that it is a diagnostic/intent-capture step. But the description never states when to prefer this over validate_api or api_coverage, nor what to do on an unrecognized document.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources