Skip to main content
Glama

yapi_parse_url

Parse a YApi page URL into base_url, project_id, and optional interface_id so your agent can target the right project or interface for API fetching.

Instructions

Parse a YApi page URL into base_url, project_id, and optional interface_id.

Example: https://yapi.example.com/project/123/interface/api/

Input Schema

NameRequiredDescriptionDefault
urlYes

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 full burden, and it never states that this is a pure local string transformation with no network call or side effects. It also says nothing about failure behavior for malformed or non-YApi URLs, or whether the input is normalized; an output schema exists but only covers success shape, not error semantics.

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?

Two lines, front-loaded with what is produced, followed by a concrete example — nothing extraneous. The example is slightly weakened by its trailing slash and missing interface segment, which can confuse an agent about what form to submit.

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?

For a one-parameter parsing utility with an output schema, the description covers the essential contract: input kind, output fields, and an example. The remaining gap — what happens on invalid input and which URL shapes are tolerated — is minor but real for a tool with zero parameter documentation.

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% — the single 'url' property carries only a type — so the description must compensate. It does so partially by naming it a YApi page URL and giving one example, but the example ('https://yapi.example.com/project/123/interface/api/') shows only one URL shape, is truncated without an interface id despite advertising interface_id as an output, and gives no guidance on accepted URL variants.

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 ('Parse') on a specific resource ('YApi page URL') and enumerates exactly what the result decomposes into: base_url, project_id, and optional interface_id. No sibling tool (configure, get_config, get_project, list_interfaces, get_interface, export_catalog) does URL decomposition, so the function is unambiguous.

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?

There is no explicit when-to-use statement, no when-not-to-use, and no mention of siblings such as yapi_configure even though the parsed base_url/project_id would presumably feed those tools. Usage is only implied by the name and by the fact that the outputs match other tools' inputs.

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