Skip to main content
Glama

yapi_get_interface

Fetches a single YApi interface's full JSON request/response definition by interface ID or detail URL, enabling accurate client code generation from API documentation.

Instructions

Get one interface's full JSON request/response definition for client codegen.

Prefer interface_id from yapi_list_interfaces, or a detail URL: https://yapi.example.com/project/123/interface/api/456

Input Schema

NameRequiredDescriptionDefault
urlNo
tokenNo
base_urlNo
interface_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the disclosure burden; 'Get' implies a read, but that is inference rather than a stated guarantee. It says nothing about the token parameter being an auth credential, permission requirements, error behavior for a bad id/URL, or what happens when both url and interface_id are supplied. A partial credit of 3 reflects the useful 'full definition for codegen' scope statement.

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?

Three short lines: purpose first, then input acquisition, then a concrete URL example that earns its space. Nothing is repeated or padded.

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 output schema exists, so return-value detail is not needed, and the core retrieval purpose is covered. However, with no annotations and zero schema coverage, the definition leaves auth (token), base_url, and the url-vs-interface_id precedence unexplained — gaps an agent would hit on first invocation.

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 0% across four parameters, so the description must compensate. It adds genuine meaning for interface_id (source: yapi_list_interfaces) and url (detail URL shape with an example), but token and base_url are left entirely undefined, and the precedence between url and interface_id is unstated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get one interface's full JSON request/response definition') plus the intended use case (client codegen), which separates it from the list-oriented sibling yapi_list_interfaces. It stops short of an explicit contrast statement, but the singular 'one interface' vs. a listing tool is clear enough to select on.

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?

Gives concrete entry paths: take interface_id from yapi_list_interfaces, or paste a detail URL in the shown format. That is real routing guidance for how to obtain inputs. It does not mention when to prefer yapi_parse_url or yapi_get_project instead, nor any exclusions.

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