Misleading _noargs parameter in TaskList tool schema causes repeated agent errors
GitHub Issue for Anthropic Claude Code
Title
Misleading _noargs parameter in TaskList tool schema causes repeated agent errors
Description
Problem
The TaskList tool's JSON Schema includes a _noargs parameter that misleads agents into attempting to pass parameters, resulting in validation errors and failure loops.
Evidence
In session 4bd4f262-0f63-409e-b853-7d051cb84b94, the agent made 11 consecutive failed calls to TaskList with invalid parameters before user intervention.
Current Schema (Problematic)
{
"name": "TaskList",
"parameters": {
"properties": {
"_noargs": {
"description": "unused placeholder (tool takes no arguments)",
"type": "string"
}
},
"type": "object"
}
}
Why This is Misleading
- The presence of
_noargssuggests parameters can be passed - Agents attempt to use
_noargsbased on the schema - Both
TaskList(file_path=...)andTaskList(_noargs="unused")fail - Error messages don't provide correct usage examples
Actual Behavior
<!-- ❌ Agent sees _noargs and tries this -->
<invoke name="TaskList">
<parameter name="_noargs">unused</parameter>
</invoke>
<!-- Error: unexpected parameter -->
<!-- ✅ Correct usage not obvious from schema -->
<invoke name="TaskList"></invoke>
Impact
- Agents enter failure loops (11+ retries observed)
- User must manually interrupt and correct
- Other tools using
_noargspattern likely affected
Proposed Solutions
Option A: Remove parameters entirely (Recommended)
{
"name": "TaskList",
"description": "Use this tool to list all tasks. This tool takes NO parameters."
}
Option B: Explicit prohibition
{
"name": "TaskList",
"parameters": {
"type": "object",
"properties": {},
"additionalProperties": false,
"description": "This tool accepts NO parameters"
}
}
Option C: Better error messages
Error: TaskList does not accept any parameters
Correct usage:
<invoke name="TaskList"></invoke>
Common mistake: Confusing TaskList (list tasks) with Read (read files)
Workaround Created
I've created an auto-fixer MCP server inspired by LangChain's tool_retry pattern:
- Detects parameter errors automatically
- Applies fix rules (e.g., TaskList → empty params)
- Auto-retries with corrected parameters
- Reduces 11 failures → 1 success
Code: https://github.com/[your-repo]/tool-call-auto-fixer
Related Issues
Search results show other users experiencing "Invalid tool parameters" errors (#15390, #23874)
Recommendation
Audit all tools using _noargs pattern and either:
- Remove the parameter definition entirely
- Add
additionalProperties: false - Improve validation error messages with usage examples
---
Environment:
- Claude Code Version: Latest
- Model: Claude Opus 4.7
- Platform: Windows 11
Session ID: 4bd4f262-0f63-409e-b853-7d051cb84b94
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗