devtu-fix-tool

Diagnose and fix failing ToolUniverse tools through error identification, targeted fixes, and test validation.

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill devtu-fix-tool-avatar-arts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: devtu-fix-tool
Source: https://github.com/AvaTar-ArTs/.Agent-skills/tree/main/skills/devtu-fix-tool
Command: npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill devtu-fix-tool-avatar-arts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? ToolUniverse tools fail integration tests due to JSON parsing errors, schema mismatches, invalid endpoints, wrong parameter types, and binary response handling issues, and diagnosing each failure manually is slow and error-prone. ## Core Features & Use Cases - Systematic Error Diagnosis: Classifies failures into nine error types (JSON parsing, schema validation, nullable fields, mixed types, invalid test examples, parameter errors, API key configuration, endpoint patterns, transient failures) with a fix location for each. - Targeted Fix Patterns: Provides concrete before/after code patterns for tool classes (*_tool.py) and JSON configs (*_tools.json), including binary response handling, nullable field schemas, and multi-operation data wrappers. - Test Validation Workflow: Covers integration tests, unit test updates in tests/unit/, and tool regeneration via python -m tooluniverse.generate_tools. - Use Case: A ChEMBL image endpoint fails with a JSON parsing error because the API returns SVG binary data; the skill guides adding Content-Type detection in the tool class and changing return_schema to {"type": "string"}, restoring a 100% pass rate. ## Quick Start Fix the failing ChEMBL_get_molecule_image tool by running its integration test, diagnosing the error, applying the appropriate fix, and verifying the tests pass.

Frequently Asked Questions about devtu-fix-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a ToolUniverse tool failing with a JSON parsing error?▼

A JSON parsing error like 'Expecting value: line 1 column 1' means the API returned binary data (image, PDF, file) instead of JSON. Add Content-Type detection in the tool class run() method to return a description string for binary responses, and set return_schema to {"type": "string"} in the JSON config.

How do I fix schema validation mismatch errors in ToolUniverse tools?▼

Schema validation checks only the data field content, not the full response. Match return_schema in the JSON config to the actual data type: string, array, or object. For optional fields returning null, use nullable types like {"type": ["integer", "null"]}.

Why does a ToolUniverse tool fail with 404 errors on valid resources?▼

A 404 usually means the endpoint URL is wrong or the test example uses an invalid ID. Verify the endpoint against official API documentation, then discover valid test examples using list-then-get or search-then-details patterns against the live API.

When should I use optional_api_keys instead of required_api_keys?▼

Use optional_api_keys for APIs that work anonymously but offer better rate limits with a key, since required_api_keys causes the tool to be skipped entirely when keys are missing. Read keys from environment variables with os.environ.get(), never as tool parameters.

Do I need to regenerate tools after changing ToolUniverse JSON configs?▼

Yes, run python -m tooluniverse.generate_tools after modifying any *_tools.json config or tool class implementation. Regeneration is not needed for changes to test scripts only. Re-run integration tests afterward to verify the fix.

How should unit tests handle transient API failures?▼

Unit tests should use pytest.skip() for transient errors like timeouts, connection failures, or 5xx responses rather than failing. This prevents external API outages from breaking the test suite while still catching genuine regressions.