mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-20 21:05:17 +02:00
Fix TypeScript type error in RESOURCE prompt
- Cast messages array to any to work around resource type mismatch - ALL_RESOURCES contains name field but Resource type expects text/blob - Similar to fix applied to GET_RESOURCE_REFERENCE tool 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -421,20 +421,20 @@ export const createServer = () => {
|
|||||||
return {
|
return {
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
role: "user" as const,
|
role: "user",
|
||||||
content: {
|
content: {
|
||||||
type: "text" as const,
|
type: "text",
|
||||||
text: `This prompt includes Resource ${parsedId}. Please analyze the following resource:`,
|
text: `This prompt includes Resource ${parsedId}. Please analyze the following resource:`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
role: "user" as const,
|
role: "user",
|
||||||
content: {
|
content: {
|
||||||
type: "resource" as const,
|
type: "resource",
|
||||||
resource: resource,
|
resource: resource,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
] as any,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user