The audit-server exposes a single tool (auditPackage) with a clear action verb in the name, but has significant gaps in schema clarity, parameter validation, and error handling. The input schema is visible and uses Zod validation, but the output schema is undocumented, and critical parameters lack constraint specification. Descriptions are present but generic, and there is no guidance on error recovery or handling of edge cases like missing project files or network failures.
审计前端工程的所有直接和间接依赖,得到安全审计结果。支持本地工程的审计,也支持远程仓库的审计。审计结果为标准格式的markdown字符串,不用修改,直接用于展示即可。
Output schema is completely undocumented. The tool returns a fixed text message ('审计完成,结果已保存到: ${savePath}') but does not document what fields LLMs should expect or what the rendered audit result structure contains. LLMs cannot reason about downstream tool calls or validate the success of the operation.
Input parameters lack critical constraints. 'projectRoot' accepts a local path OR a remote URL, but the description does not clarify what formats are valid (http://, https://, file://, relative, absolute paths). LLMs will guess and may pass invalid input. Similarly, 'savePath' must be an absolute path for desktop scenarios, but this constraint is embedded in a long Chinese description and not enforced by the schema.
No error handling or recovery guidance. The tool description does not state what happens if the project root does not exist, is not a valid Node.js project, lacks a package.json, has network connectivity issues, or npm audit fails. LLMs cannot plan fallbacks or explain failures to users.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 47 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 28 | - | v1 |
Parameter descriptions are in Chinese and overly verbose. 'savePath' description (122 chars) mixes multiple concerns: file naming convention, fallback behavior for missing projects, and absolute path requirement for desktop. This is hard for LLMs to parse, especially in non-Chinese contexts. Descriptions should be concise, English, and focused on one concern per parameter.
No idempotency guidance. If an LLM calls auditPackage twice with the same projectRoot and savePath, it will overwrite the previous audit file. The tool lacks documentation on whether this is safe, or if the LLM should check for existing results before retrying.
Tool description is in Chinese ('审计前端工程的所有直接和间接依赖…'). While this may be intentional for a Chinese-language tool, it makes the server unusable for English-speaking agents and violates the principle of universal accessibility. Descriptions should be in English or explicitly marked as locale-specific.