Single tool with severely incomplete specification. Tool name 'book_search' is adequate (starts with verb), but description is a Chinese-only string with no English explanation of PURPOSE, WHEN TO USE, or OUTPUT FORMAT. Input schema exists but lacks formal JSON Schema structure in the tool registration. Output is documented only as 'str' with no structured schema. Error handling is present in code but not declared in tool metadata. The tool appends a Chinese instruction prompt requesting LLM formatting rather than returning structured data, which violates the response-shaper pattern by forcing the LLM to parse and reformat unstructured text.
搜索图书信息
Tool description is non-English (Chinese only: '搜索图书信息') and lacks PURPOSE, WHEN TO USE, and OUTPUT STRUCTURE. Bilingual or English descriptions are mandatory for international LLM compatibility.
Input schema 'query' lacks formal JSON Schema structure. No 'type' field is explicitly declared in tool metadata; only inferred from code. Tool registration should use @app.tool() with explicit schema annotations.
Output is unstructured string (plain text). Tool appends Chinese formatting instruction ('【请帮我整理以上书本信息...】') asking the LLM to reformat the response, violating response-shaper pattern. Tool should return structured JSON with book objects (title, author, pages, publisher, publish_date, url, abstract) so the LLM can reason about individual books.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 35 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 8 | - | v1 |
No pagination or result limits. Web scraping can return many results; tool should cap results at 20 - 50 and implement page/offset parameters. Current implementation returns all results without truncation guidance.
Error handling is code-level (try/except with logging) but not expressed in tool metadata. Tool returns human-readable error strings, but specification lacks documented error categories, retryability, or recovery guidance for the LLM.
Parameter description for 'query' is minimal ('要搜索的图书关键词' = 'book keywords to search'). No guidance on expected format (e.g., minimum/maximum length, partial vs. exact match behavior, multi-word vs. single word).