BerriAI/litellm · error · ValueError
name is required for tool {name}
Error message
name is required for tool {name} What it means
Registry loader validation for tools declared in config: a tool entry reached registration without a name. This generic ValueError is raised while parsing the config list, before any handler resolution.
Source
Thrown at litellm/proxy/_experimental/mcp_server/tool_registry.py:130
input_schema = tool_config.get("input_schema", {})
handler_name = tool_config.get("handler")
if not all([name, description, handler_name]):
continue
# Try to resolve the handler
# First check if it's a module path (e.g., "module.submodule.function")
if handler_name is None:
raise ValueError(f"handler is required for tool {name}")
handler = get_instance_fn(handler_name, config_file_path)
if handler is None:
verbose_logger.warning("Warning: Could not find handler %s for tool %s", handler_name, name)
continue
# Register the tool
if name is None:
raise ValueError(f"name is required for tool {name}")
if description is None:
raise ValueError(f"description is required for tool {name}")
self.register_tool(
name=name,
description=description,
input_schema=input_schema,
handler=handler,
)
verbose_logger.debug("all registered tools: %s", json.dumps(self.tools, indent=4, default=str))
global_mcp_tool_registry: Final = MCPToolRegistry()
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Add a 'name' field to the tool entry in mcp_tools config.
Example fix
mcp_tools: [{name: 'my_tool', ...}] Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/_experimental/mcp_server/tool_registry.py:130 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/b351cdf4696b2772.
Report an issue: GitHub.