updates listed resources from resource templates to favor their own metadata
This commit is contained in:
parent
590d484137
commit
6cf034595d
1 changed files with 2 additions and 1 deletions
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue