openapi_get_operation_details
Retrieve OpenAPI operation details by operationId, method+path, or path. Optionally resolve refs and format as JSON or Markdown.
Instructions
Get detailed information for specific OpenAPI operations.
Agent usage guidelines: - Use this tool when you need detailed information about specific API operations. - Use selectors to target specific operations by operationId, method+path, or path. - Set expand_refs=True to resolve schema references for full schema details. - Choose format_output="json" for structured data, "markdown" for formatted output.
Path requirements: - The path must not contain URL-encoding (e.g., '%'). - The path must be absolute. - The path must exist on disk and be a valid OpenAPI JSON or YAML file.
Args: spec_path (str): Absolute path to the OpenAPI JSON or YAML file. selectors (list[str]): List of selectors. Each selector can be: - operationId (exact match) - "METHOD /path" (e.g. "GET /users/{id}") - just a path (e.g. "/users/{id}") to match all methods on that path expand_refs (bool): Whether to resolve local $ref references in schemas. Defaults to False. format_output (str | None): Output format ('json' or 'markdown'). Defaults to server setting.
Returns: dict | str: For format_output="json": Dictionary containing operation details and metadata. - details: list of detailed operation records - count: number of matching operations - error: error message if any, None otherwise For format_output="markdown": formatted markdown string
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selectors | Yes | ||
| spec_path | Yes | ||
| expand_refs | No | ||
| format_output | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |