Skip to main content
Glama

yapi_import_data

Import API data from Swagger, HAR, Postman, or JSON into your YAPI project. Specify the data type, JSON content, and project ID to sync interfaces.

Instructions

服务端数据导入,支持导入 Swagger、HAR、Postman 等格式的接口数据到 YAPI 项目

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonYes导入的数据内容(JSON 字符串)
typeYes导入数据类型
mergeNo数据同步模式:normal(普通), good(智能), merge(合并)。默认为 normal
project_idYes目标项目 ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It says '服务端数据导入' but never discloses whether existing interfaces are overwritten, whether the import is idempotent, what merge/sync semantics apply, or what permissions are required — significant gaps for a mutation tool.

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 naming the action, scope, and supported formats with no filler. It is appropriately sized, though the brevity leaves behavioral gaps unaddressed.

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?

For a four-parameter mutation tool with no annotations and no output schema, the description covers what is imported but not the side effects, overwrite behavior, or return outcome. It is minimally adequate given the fully documented schema but incomplete on behavior.

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%, so all four parameters (json, type, merge, project_id) are already documented in the schema, and two carry enums. The description only restates the supported formats, which the `type` enum already conveys, adding little beyond the schema baseline.

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 (导入/import), the resource (接口数据/interface data), and the supported source formats (Swagger, HAR, Postman) into a YAPI project. This clearly separates it from siblings like yapi_add_interface or yapi_update_interface, though it never names those siblings explicitly.

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?

The format list implies bulk/source-file imports versus single-interface creation, but there is no explicit when-to-use statement, no exclusion of alternatives, and no note on prerequisites such as project permissions. Usage is only inferable from the description.

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