You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: let an mcp tool handler return isError with a caller-facing message #716
An mcp tool handler can report a failure to the caller only by throwing, and the extension then returns a fixed The tool could not complete the request. with isError: true. A handler has no way to return isError: true together with its own caller-safe message, which the MCP spec intends for tool-execution errors the model should see and correct (for example "Unknown skill. Did you mean "urlcode-operations"?" or a YAML validator message).
urlcode-ai used to return those as isError: true results. With the extension it now returns them as successful results carrying an error object, which clients can't tell apart from success without parsing.
Proposed behavior and alternatives
Let a tool handler return an explicit tool error, for example a returned {isError: true, content} / {isError: true, structuredContent} marker, or a thrown McpToolError(message, data?) exported by the extension whose message is sent to the caller. Other thrown errors keep the generic message.
Report it to onToolCall as a third outcome ('tool_error'), separate from a thrown 'error'.
Activity
feat(mcp): McpToolError lets a tool return a caller-facing isError re…
chore(mcp): regenerate urlcode.json descriptor for the McpToolError a…
feat: auth owns the auth: shorthand, extension activation errors, bod…