[BUG] MCP tools with empty parameter schemas display without tool name/args header
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When an MCP tool has an empty parameter schema (no parameters defined), Claude Code displays only the tool output without showing the tool name or arguments header. This makes it unclear which tool was called and breaks the visual consistency of tool call displays.
Tools with at least one parameter (even optional) display correctly with the full header showing tool name and arguments, but tools with completely empty schemas are rendered as bare output.
Please see these screenshots with the buggy truncated output and the correct full output.
<img width="1743" height="560" alt="Image" src="https://github.com/user-attachments/assets/56138e44-06bb-400f-915a-679d77723cfb" />
<img width="791" height="482" alt="Image" src="https://github.com/user-attachments/assets/9f289035-16e0-41f7-a6cc-f2cfd096bdff" />
What Should Happen?
All MCP tool calls should display with a consistent header showing:
- Tool name (e.g., 🔧 sync_documents)
- Arguments (even if empty: {})
- Output
Steps to Reproduce
- Create an MCP tool with an empty parameter schema:
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct TestToolRequest {}
#[tool(name = "test_tool", description = "Test tool")]
async fn test_tool(&self, params: Parameters<TestToolRequest>) -> Result<String, String> {
Ok("test output".to_string())
}
- Build and connect the MCP server to Claude Code
- Call the tool: mcp__server__test_tool
- Observe: Only "test output" is displayed, without tool name header
- Add a parameter to the schema:
pub struct TestToolRequest {
pub optional_param: Option<String>,
}
- Rebuild, reload, and call again
- Observe: Now displays correctly with 🔧 test_tool header
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Claude Code Version
2.0.14
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Zed integrated terminal
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗