Skip to main content
Glama

Getopenapidocforentity

getOpenApiDocForEntity

Get the OpenAPI document registered against an entity - the API the service actually exposes. Distinct from the entity's Cortex descriptor, which getEntityDescriptor returns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName of the OpenAPI spec to return. If you have multiple OpenAPI specs configured for your entity as `x-cortex-links`, use this parameter to ensure the correct spec is returned. If this parameter is not specified, we will return the first OpenAPI spec found.
contextYes Explain why you're invoking this tool now and how its output will be used. Then state how this call supports your *overall objective* and fits into your broader plan across all tool calls (e.g., why this tool vs. others, and what step it unblocks). Never share any personal details or sensitive information.
tagOrIdYesEntity identifier - can be a tag or CID
session_idYesSession continuity handle, one of two values: the ses_ ID issued for the task underway, or start. This server cannot link your calls between requests on its own, so session continuity travels in this parameter instead. If you were handed a session_id for this task — for example by the agent that spawned you — send that exact value from your first call. Otherwise send start on your first call; the server will issue an opaque correlation ID in the mcp_session field of the result, or in a text block at the start of the result beginning [session_id issued. Then send that exact ses_ value on every later call and hand it to any subagents working the same task. start always begins a new, unrelated task — never send it mid-task. If you send a value this server does not recognize, the result reports it: mcp_session.status of unrecognized, or a text block beginning [session_id unrecognized; re-send the ID issued for this task, or start if none was issued yet. Never invent a ses_ value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It explains what the tool does but does not mention side effects, permissions, error handling, or the return format beyond the implied OpenAPI document. For a read operation, it lacks detail on what happens if no spec is found or if multiple specs exist (though the name parameter partially covers that).

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?

Two sentences with zero filler. The core purpose is stated first, and the differentiating sibling is mentioned second. Every sentence earns its place, and the structure is front-loaded and efficient.

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?

The description is adequate for a simple retrieval tool, but lacks some contextual details. There is no output schema, so the agent must infer that the result is an OpenAPI document, which is standard but not explicitly stated. The description does not cover edge cases like multiple specs or missing specs, though the name parameter hints at that. Given the simplicity and the clear sibling contrast, it is functional but not rich.

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 coverage is 100%, so all parameters are well-documented in the schema itself. The tool description adds no additional parameter meaning beyond the schema, meeting the baseline for high coverage. The description does not clarify any parameter behavior beyond what the schema already provides.

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 specific action ('Get the OpenAPI document registered against an entity') and differentiates it from a sibling tool by naming getEntityDescriptor and the distinction between the exposed API and the Cortex descriptor. This is specific and unambiguous.

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 explicitly contrasts this tool with getEntityDescriptor, providing a clear when-to-use cue. However, it does not explicitly state when not to use this tool or mention any alternative scenarios beyond that single sibling, leaving some room for inference.

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