generated from micronaut-projects/micronaut-project-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Expected Behavior
Suppose I have the following definition:
@ResourceTemplate(
uriTemplate = "book://book/{title}",
mimeType = "text/plain",
name = "book",
title = "Library Book Description",
description = "Provide description about a book"
)
String getBookDescription(String title) {
return bookService.get(title)
.orElseThrow(() -> new McpError(new McpSchema.JSONRPCResponse.JSONRPCError(
McpSchema.ErrorCodes.RESOURCE_NOT_FOUND,
"resource for title " + title + " not found",
null
)));
}Title might contain spaces and therefore will be URL-encoded. The parameter needs to be provided in a URL-decoded format.
Actual Behaviour
I get the following error:
{
"error":
"MCP error -32001: Error POSTing to endpoint (HTTP 500): {"jsonrpc":"2.0","id":19,"error":{"code":-32002,"message":"resource for title A%20Tale%20of%20Two%20Cities not found"}}"
}Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
0.0.12
Metadata
Metadata
Assignees
Labels
No labels