DE

devtu-fix-tool

Fix errors and test failures in ToolUniverse automation tools.

Install

mkdir -p .claude/skills/devtu-fix-tool && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3543" && unzip -o skill.zip -d .claude/skills/devtu-fix-tool && rm skill.zip

Installs to .claude/skills/devtu-fix-tool

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Fix failing ToolUniverse tools by diagnosing test failures, identifying root causes, implementing fixes, and validating solutions. Use when ToolUniverse tools fail tests, return errors, have schema validation issues, or when asked to debug or fix tools in the ToolUniverse framework.
283 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Diagnose test failures in ToolUniverse tools
  • Validate API schemas and parameter types
  • Implement fixes for schema mismatches
  • Update tool tests and examples
  • Regenerate tool configurations

How it works

The skill guides the user through a systematic process of verifying bugs via CLI, identifying error types, and applying targeted fixes to JSON configs or Python code.

Inputs & outputs

You give it
Failing tool name and error logs
You get back
Fixed tool code and updated configuration

When to use devtu-fix-tool

  • Fixing failing ToolUniverse tools
  • Resolving schema validation errors
  • Debugging custom tool logic

About this skill

Fix ToolUniverse Tools

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

First Principles for Bug Fixes

Before writing any fix, ask: why does the user reach this failure state?

  1. Prevent, don't recover — fix the root cause so the failure can't happen, rather than adding hint text after it does
  2. Validate at input, not at output — wrong parameters, unknown disease names, unsupported drugs should be caught and rejected early with clear guidance, not discovered after a silent API call
  3. Don't mask silent mutations — if input is auto-normalized (fusion notation, Title Case), either accept both forms natively OR reject with explicit guidance; never silently transform and hide it
  4. Distinguish "no data" from "bad query" — zero results because the filter is wrong is different from zero results because the data doesn't exist; the response must distinguish these clearly
  5. Fix the abstraction, not the instance — if a parameter name is inconsistent, fix the interface; don't add an alias list that grows forever

Anti-patterns to avoid:

  • Adding hint text to zero-result messages instead of validating upfront
  • Adding parameter aliases instead of fixing naming consistency
  • Post-hoc probing to rescue a failed query instead of pre-validating

Bug Verification (CRITICAL)

Before implementing any bug report, verify it via CLI first:

python3 -m tooluniverse.cli run <ToolName> '<json_args>'

Many agent-reported bugs are false positives caused by MCP interface confusion. Always confirm the bug is reproducible before implementing a fix.


Instructions

When fixing a failing tool:

  1. Run targeted test to identify error:
python scripts/test_new_tools.py <tool-pattern> -v
  1. Verify API is correct - search online for official API documentation to confirm endpoints, parameters, and patterns are correct

  2. Identify error type (see Error Types section)

  3. Apply appropriate fix based on error pattern

  4. Regenerate tools if you modified JSON configs or tool classes:

python -m tooluniverse.generate_tools
  1. Check and update tool tests if they exist in tests/tools/:
ls tests/tools/test_<tool-name>_tool.py
  1. Verify fix by re-running both integration and unit tests

  2. Provide fix summary with problem, root cause, solution, and test results

Where to Fix

Issue TypeFile to Modify
Binary responsesrc/tooluniverse/*_tool.py + src/tooluniverse/data/*_tools.json
Schema mismatchsrc/tooluniverse/data/*_tools.json (return_schema)
Missing data wrappersrc/tooluniverse/*_tool.py (operation methods)
Endpoint URLsrc/tooluniverse/data/*_tools.json (endpoint field)
Invalid test examplesrc/tooluniverse/data/*_tools.json (test_examples)
Tool test updatestests/tools/test_*_tool.py (if exists)
API key as parametersrc/tooluniverse/data/*_tools.json (remove param) + *_tool.py (use env var)
Tool not loading (optional key)src/tooluniverse/data/*_tools.json (use optional_api_keys not required_api_keys)

Error Types

1. JSON Parsing Errors

Symptom: Expecting value: line 1 column 1 (char 0)

Cause: Tool expects JSON but receives binary data (images, PDFs, files)

Fix: Check Content-Type header. For binary responses, return a description string instead of parsing JSON. Update return_schema to {"type": "string"}.

2. Schema Validation Errors

Symptom: Schema Mismatch: At root: ... is not of type 'object' or Data: None

Cause: Missing data field wrapper OR wrong schema type

Fix depends on the error:

  • If Data: None → Add data wrapper to ALL operation methods (see Multi-Operation Pattern below)
  • If type mismatch → Update return_schema in JSON config:
    • Data is string: {"type": "string"}
    • Data is array: {"type": "array", "items": {...}}
    • Data is object: {"type": "object", "properties": {...}}

Key concept: Schema validates the data field content, NOT the full response.

3. Nullable Field Errors

Symptom: Schema Mismatch: At N->fieldName: None is not of type 'integer'

Cause: API returns None/null for optional fields

Fix: Allow nullable types in JSON config using {"type": ["<base_type>", "null"]}. Use for optional fields, not required identifiers.

4. Mutually Exclusive Parameter Errors

Symptom: Parameter validation failed for 'param_name': None is not of type 'integer' when passing a different parameter

Cause: Tool accepts EITHER paramA OR paramB (mutually exclusive), but both are defined with fixed types. When only one is provided, validation fails because the other is None.

Example:

{
  "neuron_id": {"type": "integer"},      // ❌ Fails when neuron_name is used
  "neuron_name": {"type": "string"}      // ❌ Fails when neuron_id is used
}

Fix: Make mutually exclusive parameters nullable:

{
  "neuron_id": {"type": ["integer", "null"]},      // ✅ Allows None
  "neuron_name": {"type": ["string", "null"]}      // ✅ Allows None
}

Common patterns:

  • id OR name parameters (get by ID or by name)
  • acronym OR name parameters (search by symbol or full name)
  • Optional filter parameters that may not be provided

Important: Also make truly optional parameters (like filter_field, filter_value) nullable even if not mutually exclusive.

5. Mixed Type Field Errors

Symptom: Schema Mismatch: At N->field: {object} is not of type 'string', 'null'

Cause: Field returns different structures depending on context

Fix: Use oneOf in JSON config for fields with multiple distinct schemas. Different from nullable ({"type": ["string", "null"]}) which is same base type + null.

6. Invalid Test Examples

Symptom: 404 ERROR - Not found or 400 Bad Request

Cause: Test example uses invalid/outdated IDs

Fix: Discover valid examples using the List → Get or Search → Details patterns below.

7. API Parameter Errors

Symptom: 400 Bad Request or parameter validation errors

Fix: Update parameter schema in JSON config with correct types, required fields, and enums.

8. API Key Configuration Errors

Symptom: Tool not loading when API key is optional, or api_key parameter causing confusion

Cause: Using required_api_keys for keys that should be optional, or exposing API key as tool parameter

Key differences:

  • required_api_keys: Tool is skipped if keys are missing
  • optional_api_keys: Tool loads and works without keys (with reduced performance)

Fix: Use optional_api_keys in JSON config for APIs that work anonymously but have better rate limits with keys. Read API key from environment only (os.environ.get()), never as a tool parameter.

9. API Endpoint Pattern Errors

Symptom: 404 for valid resources, or unexpected results

Fix: Verify official API docs - check if values belong in URL path vs query parameters.

10. Transient API Failures

Symptom: Tests fail intermittently with timeout/connection/5xx errors

Fix: Use pytest.skip() for transient errors in unit tests - don't fail on external API outages.

Common Fix Patterns

Schema Validation Pattern

Schema validates the data field content, not the full response. Match return_schema type to what's inside data (array, object, or string).

Multi-Operation Tool Pattern

Every internal method must return {"status": "...", "data": {...}}. Don't use alternative field names at top level.

Finding Valid Test Examples

When test examples fail with 400/404, discover valid IDs by:

  • List → Get: Call a list endpoint first, extract ID from results
  • Search → Details: Search for a known entity, use returned ID
  • Iterate Versions: Try different dataset versions if supported

Unit Test Management

Check for Unit Tests

After fixing a tool, check if unit tests exist:

ls tests/tools/test_<tool-name>_tool.py

When to Update Unit Tests

Update unit tests when you:

  1. Change return structure: Update assertions checking result["data"] structure
  2. Add/modify operations: Add test cases for new operations
  3. Change error handling: Update error assertions
  4. Modify required parameters: Update parameter validation tests
  5. Fix schema issues: Ensure tests validate correct data structure
  6. Add binary handling: Add tests for binary responses

Running Unit Tests

# Run specific tool tests
pytest tests/tools/test_<tool-name>_tool.py -v

# Run all unit tests
pytest tests/tools/ -v

Unit Test Checklist

  • Check if tests/tools/test_<tool-name>_tool.py exists
  • Run unit tests before and after fix
  • Update assertions if data structure changed
  • Ensure both direct and interface tests pass

For detailed unit test patterns and examples, see unit-tests-reference.md.

Verification

Run Integration Tests

python scripts/test_new_tools.py <pattern> -v

Run Unit Tests (if exist)

pytest tests/tools/test_<tool-name>_tool.py -v

Regenerate Tools

After modifying JSON configs or tool classes:

python -m tooluniverse.generate_tools

Regenerate after:

  • Changing src/tooluniverse/data/*_tools.json files
  • Modifying tool class implementations

Not needed for test script changes.

Output Format

After fixing, provide this summary:

Problem: [Brief description]

Root Cause: [Why it failed]

Solution: [What was changed]

Changes Made:

  • File 1: [Description]
  • File 2: [Description]
  • File 3 (if applicable): [Unit test updates]

Integration Test Results:

  • Before: X tests, Y passed (Z%), N failed, M schema invalid
  • After: X tests, X passed (100.0%), 0 failed, 0 schema i

Content truncated.

When not to use it

  • Fixing tools outside the ToolUniverse framework
  • Debugging general Python application logic

Prerequisites

ToolUniverse environmentPython 3

Limitations

  • Requires access to ToolUniverse source files
  • Fixes are specific to the ToolUniverse architecture

How it compares

It provides a framework-specific debugging workflow that addresses common ToolUniverse issues like schema validation and parameter exclusivity.

Compared to similar skills

devtu-fix-tool side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
devtu-fix-tool (this skill)15moReviewAdvanced
genius-debugger04moReviewIntermediate
dependency-upgrade265moReviewIntermediate
chrome-devtools417moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by mims-harvard

View all by mims-harvard

tooluniverse-drug-research

mims-harvard

Generates comprehensive drug research reports with compound disambiguation, evidence grading, and mandatory completeness sections. Covers identity, chemistry, pharmacology, targets, clinical trials, safety, pharmacogenomics, and ADMET properties. Use when users ask about drugs, medications, therapeutics, or need drug profiling, safety assessment, or clinical development research.

323

tooluniverse-pharmacovigilance

mims-harvard

Analyze drug safety signals from FDA adverse event reports, label warnings, and pharmacogenomic data. Calculates disproportionality measures (PRR, ROR), identifies serious adverse events, assesses pharmacogenomic risk variants. Use when asked about drug safety, adverse events, post-market surveillance, or risk-benefit assessment.

323

tooluniverse-precision-oncology

mims-harvard

Provide actionable treatment recommendations for cancer patients based on molecular profile. Interprets tumor mutations, identifies FDA-approved therapies, finds resistance mechanisms, matches clinical trials. Use when oncologist asks about treatment options for specific mutations (EGFR, KRAS, BRAF, etc.), therapy resistance, or clinical trial eligibility.

321

tooluniverse-expression-data-retrieval

mims-harvard

Retrieves gene expression and omics datasets from ArrayExpress and BioStudies with gene disambiguation, experiment quality assessment, and structured reports. Creates comprehensive dataset profiles with metadata, sample information, and download links. Use when users need expression data, omics datasets, or mention ArrayExpress (E-MTAB, E-GEOD) or BioStudies (S-BSST) accessions.

217

tooluniverse-literature-deep-research

mims-harvard

Conduct comprehensive literature research with target disambiguation, evidence grading, and structured theme extraction. Creates a detailed report with mandatory completeness checklist, biological model synthesis, and testable hypotheses. For biological targets, resolves official IDs (Ensembl/UniProt), synonyms, naming collisions, and gathers expression/pathway context before literature search. Default deliverable is a report file; for single factoid questions, uses a fast verification mode and may include an inline answer. Use when users need thorough literature reviews, target profiles, or to verify specific claims from the literature.

213

tooluniverse-target-research

mims-harvard

Gather comprehensive biological target intelligence from 9 parallel research paths covering protein info, structure, interactions, pathways, expression, variants, drug interactions, and literature. Features collision-aware searches, evidence grading (T1-T4), explicit Open Targets coverage, and mandatory completeness auditing. Use when users ask about drug targets, proteins, genes, or need target validation, druggability assessment, or comprehensive target profiling.

25

Search skills

Search the agent skills registry