MCP server for uploading Swagger/OpenAPI documentation to ApiFox platform
This server defines 2 tools with partial documentation. Tool 1 (getSwaggerSpecification) has a moderately detailed description but NO input schema (empty object `{}`), which is a critical gap. Tool 2 (uploadSwaggerToApiFox) has both a description and a complete input schema with 3 required parameters, each with a type and description. However, both tool descriptions contain Chinese text and are lengthy (>300 chars), which is less optimal for LLM parsing. Neither tool includes output schema documentation. The naming follows verb_noun convention (get_, upload_), which is good. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are present. Parameter descriptions in Tool 2 are adequate but lack format constraints (e.g., no regex patterns, min/max, or enum guidance). Tool 1's empty schema is a hard scoring violation, it signals no structured input, yet the tool exists, so the schema must be documented. Tool 2's parameters reference credentials (accessToken, projectId) as required inputs, which violates the secret-injection pattern (credentials should be server-side injected, not passed as parameters). Error handling and recovery guidance are absent from both tools.
获取Swagger参数规范示例,返回标准的Swagger JSON格式规范,基于Petstore示例。使用此工具了解正确的Swagger JSON结构,然后可以参考此格式创建自己的API文档并使用uploadSwaggerToApiFox工具上传。
上传Swagger JSON到ApiFox平台。参数:projectId(ApiFox项目ID,必填), accessToken(ApiFox访问令牌,必填), swaggerJson(完整的Swagger JSON字符串,必填)。建议先使用getSwaggerSpecification工具获取规范格式。
Tool 'getSwaggerSpecification' has an empty input schema ({}). By the hard scoring rule, schema score MUST be 0. This tool needs documented input structure, even if it accepts no parameters.
Credentials (accessToken, projectId) exposed as tool parameters in 'uploadSwaggerToApiFox'. Per the secret-injection pattern, these must be injected server-side via environment variables or vault, not passed by the agent. Leaking secrets into parameter logs violates security baseline.
No output schema documented for either tool. LLMs cannot plan downstream composition or extract the right fields without knowing what structure is returned. Tool 1 should document the Swagger JSON structure returned; Tool 2 should document the response (success/failure, resource IDs, etc.).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 44 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 31 | - | v1 |
No tool annotations present. Neither tool declares readOnlyHint (Tool 1), destructiveHint (Tool 2 modifies state), or idempotentHint. These annotations help agents reason about safety and retry behavior.
Tool descriptions in Chinese and exceed 300 characters. LLMs process English descriptions more reliably, and descriptions >250 chars risk token waste and reduced clarity. Tool 1: ~380 chars (Chinese); Tool 2: ~300 chars (Chinese). Translate and condense.
No error handling or recovery guidance documented. If Tool 2 fails (invalid token, network error, invalid Swagger JSON), there is no indication of what the LLM should do next. Add error classification (retryable vs user-fixable) and recovery hints.
Parameter constraints missing. Tool 2's 'swaggerJson' parameter should indicate expected format (valid JSON object string) and min/max size. 'projectId' and 'accessToken' lack format hints (e.g., regex patterns, length ranges). Unconstrained parameters invite LLM-generated invalid input.