Skip to content

Commit 2e2e51d

Browse files
committed
fix(time): simplify to only fix call_tool handler (ValueError→McpError)
1 parent dc5ba4c commit 2e2e51d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/time/src/mcp_server_time/server.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ async def call_tool(
213213
]
214214

215215
except Exception as e:
216-
raise ValueError(f"Error processing mcp-server-time query: {str(e)}")
216+
raise McpError(ErrorData(code=INVALID_PARAMS, message=f"Error processing time query: {str(e)}"))
217217

218218
options = server.create_initialization_options()
219219
async with stdio_server() as (read_stream, write_stream):

0 commit comments

Comments
 (0)