Conversation
|
I would be happy to have and adopt this for VS Code 👍 |
|
I think there is a use case for returning a temporary resource that can be read via |
|
We'd be far better off including Resource as it also has the LLM Facing description. And then at the same time we could add |
|
@bhosmer-ant if in agreement we switch to Resource we should also add this to the Prompt primitive too. |
I agree I've noted this idea in #617 as well in relation to the idea of sending back resources as part of progress notifications. I think the original motivation of resource is to find long lived static resources that the server holds. However I think there are a set of use cases for short lived temporary resources associated with a specific request. This does open up the question of how long those resources are valid to avoid clogging up the server. I'm suggesting the idea of a keepAlive flag that tells the client how long it can expect the resource to be held by the server. |
@evalstate hey Shaun, yeah I think you and @jonathanhefner are totally right, Resource is better than ResourceReference here. (Going this way introduces ambiguity around whether
I'd like to leave
Yeah agreed. Actually I think it's worth factoring out and using it from both
I mean, I'll take you up on it if you agree with the above, but also happy to do it if your offer has aged out! Just LMK (and 🙏 for the discussion either way) |
|
Perfect! I'll update first thing in the morning and agree on moving the subscribable discussion elsewhere. 👍 |
schema/draft/schema.ts
Outdated
| * of the LLM and/or the user. | ||
| * | ||
| */ | ||
| export interface LinkedResource { |
There was a problem hiding this comment.
This has been added for Type Discrimination within the content block.
| export interface PromptMessage { | ||
| role: Role; | ||
| content: TextContent | ImageContent | AudioContent | EmbeddedResource; | ||
| content: ContentBlock; |
There was a problem hiding this comment.
This would be a good time to merge turns this in to an Array similar to the existing ToolCallResult.
There was a problem hiding this comment.
Took a quick look at that discussion, seems well motivated to me but I think best to keep it a separate PR
|
lgtm 🙂 |
0096774 to
383772c
Compare
schema/draft/schema.ts
Outdated
There was a problem hiding this comment.
why aren't we letting CallToolResult include a Resource directly vs. introducing LinkedResource?
There was a problem hiding this comment.
We need the type discriminator.
There was a problem hiding this comment.
| [Resources](/specification/draft/server/resources) **MAY** be linked, to provide additional context | |
| or data, behind a URI that can be subscribed to or fetched by the client: | |
| A tool **MAY** return links to [Resources](/specification/draft/server/resources) **MAY**, to provide additional context | |
| or data. In this case, the tool will return a URI that can be subscribed to or fetched by the client: |
Given that we are inheriting from the But also not a strong preference, just thinking out loud |
|
@ihrpr @dsp-ant I'm also weak on the name. The "real" name is How about Followup: "content" sort of implies removing a level of indirection, so not a panacea. Going with |
I went down this path...:) We already have a |
…l Results and Prompts
…l Results and Prompts
Yeah, I also though about |
|
I ran this [naming] problem through the Claude quite a few times! |
5ab58db to
bfbd362
Compare
Enables tool calls to return
ResourceLinks (in addition to fullEmbeddedResources) in results.Motivation and Context
Returning resource links enables interaction flows where returning resource content inline is impractical.
ResourceLinkreuses theResourcestructure unchanged, but adds a necessary type tag for disambiguation inContentBlockarrays.How Has This Been Tested?
No testing yet.
Breaking Changes
Older clients will not be able to interpret the new content type.
Types of changes
Checklist
Additional context