updates listed resources from resource templates to favor their own metadata

This commit is contained in:
Carl Peaslee 2025-05-30 11:32:10 -07:00
commit 6cf034595d
No known key found for this signature in database

View file

@ -369,8 +369,9 @@ export class McpServer {
const result = await template.resourceTemplate.listCallback(extra);
for (const resource of result.resources) {
templateResources.push({
...resource,
...template.metadata,
// the defined resource metadata should override the template metadata if present
...resource,
});
}
}