Conversation
Signed-off-by: Calum Murray <[email protected]>
Signed-off-by: Calum Murray <[email protected]>
|
It seems like, at a minimum, we probably want to only use static resources and not a template: anthropics/claude-code#4110 This is probably fine since I believe most clients do not load each resource into the agent's context |
In general, I never attempted to add resources to the server because this are mostly used at the expense of the user. At least, a couple of months ago, users of VSCode, claude, etc. had to specifically reference a Resource as part of their prompt. I think it was part of the Stacklock Kubernetes MCP server that they were actually exposing all Kubernetes resources as discoverable MCP resources. Something pretty neat, but that it just doesn't work because the agents/MCPHosts aren't designed that way. I'm fine with adding the API support for resources, but I wouldn't go much far that that for the moment. This might be a required feature for some toolset implementers and we should definitely add support for it. But other than that, I wouldn't work on our toolsets to add resource discovery until this proves to be something valuable in any of the mainstream coding agents. |
| // crdOpenAPISpecResourceTemplate returns a resource template that provides the OpenAPI spec for a CRD. | ||
| // The URI format is: k8s://crds/{name}/openapi | ||
| // Where {name} is the full CRD name (e.g., "virtualmachines.kubevirt.io") | ||
| func crdOpenAPISpecResourceTemplate() api.ServerResourceTemplate { |
There was a problem hiding this comment.
In theory I get this via resources_get somewhat, but here we have a little more convenient usage. Instead of going via CustomResourceDefinition tool for _get
I like adding the api enhancements that are done in the first commit - I also don't mind that crd template. Or would that be already too much, @manusa ? |
@Cali0707 like included/embedded documentation? |
My reply was mostly generic on the PR itself, didn't check the actual code. The same outcome can probably be achieved by #664 But haven't checked this out, so maybe I'm just wrong with my current assumptions. |
yeah, I had similar thought: #713 (comment) Didn't know about #664 - but some tool like that might be handy, agreed |
This PR explores how to add resources to the MCP server
DO NOT MERGE
I want to explore how different clients use resources, with this branch as an experiment, to see how we should best implement these