Skip to content

Conversation

@ihrpr
Copy link
Contributor

@ihrpr ihrpr commented Jul 3, 2025

No description provided.

@felixweinberger felixweinberger force-pushed the docs/develop branch 2 times, most recently from 170ad13 to 24ac67f Compare July 3, 2025 15:34
@ihrpr ihrpr marked this pull request as ready for review July 11, 2025 06:32
Copy link
Member

@jonathanhefner jonathanhefner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice overview! 😃


#### Overview

Resources use URI-based identification, with each resource having a unique URI such as `file:///path/to/document.md`. They declare MIME types for appropriate content handling and support two access patterns: direct resources with fixed URIs, and resource templates with parameterized URIs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "two access patterns" doesn't seem quite right. resources/read is the sole access pattern, whereas resources/list and resources/templates/list are the two discovery patterns.

Also, MIME types are optional, though it may be fine to gloss over that here.

Comment on lines 149 to 152
- **Name**: Unique identifier for the prompt
- **Description**: User-facing explanation of purpose
- **Arguments**: Typed parameters with optional defaults
- **Instructions**: Template text with parameter placeholders
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding "Instructions", the server doesn't expose the template text to the client, and the actual prompt content that the server returns is termed "messages" (e.g. messages[i].content). What do we want to highlight here?

Also, similar to previous comments, I think title is currently preferred over name, and these fields may be optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name is unique identifier, where title is preferred for a display. I think I will just remove this section, it's not super useful here

Comment on lines 160 to 168
```yaml
name: plan-vacation
description: Guide through vacation planning process
arguments:
- destination: string (required)
- duration: number (days)
- budget: number (optional)
- interests: array of strings
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why YAML here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for the formatting

Comment on lines 198 to 206
```yaml
prompt: plan-vacation
arguments:
destination: "Barcelona"
departure_date: "2024-06-15"
return_date: "2024-06-22"
budget: 3000
travelers: 2
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why YAML here as well?

Copy link
Contributor

@bhosmer-ant bhosmer-ant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments inline - overall I think this is a really nice overview of the building blocks.

The main thing that hit me was the feeling that the integrated example's use of resource templates is kind of implausible (IMO ofc - tell me if I'm wrong!). But I think that may really be a more fundamental question about the use of resources, rather than an issue with the content here.


#### Overview

Tools are characterized by their schema-defined interfaces, which use JSON Schema for parameter validation. Each tool performs a single, atomic operation with clearly defined inputs and outputs. Most importantly, tool execution requires explicit user approval, ensuring users maintain control over actions taken on their behalf.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Tools are characterized by their schema-defined interfaces, which use JSON Schema for parameter validation. Each tool performs a single, atomic operation with clearly defined inputs and outputs. Most importantly, tool execution requires explicit user approval, ensuring users maintain control over actions taken on their behalf.
Tools are characterized by their schema-defined interfaces, which use JSON Schema for validation. Each tool performs a single operation with clearly defined inputs and outputs. Most importantly, tool execution requires explicit user approval, ensuring users maintain control over actions taken on their behalf.
  • removed "parameter" because I wanted to say something about output validation, but "parameter (and optional output) validation" might be too much too soon
  • removed "atomic" - I think it implies a constraint that doesn't actually exist

3. **Excepteur**: Sint occaecat cupidatat non proident sunt in culpa (qui officia deserunt mollit)
### Tools - AI actions

Tools enable AI models to perform actions through server-implemented functions. Each tool defines a specific operation with typed inputs and outputs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Tools enable AI models to perform actions through server-implemented functions. Each tool defines a specific operation with typed inputs and outputs.
Tools enable AI models to perform actions through server-implemented functions. Each tool defines a specific operation with typed inputs and outputs. The model requests tool execution based on context.

Added the last sentence for color - I don't think it overspecifies but ymmv

- **Travel documents** (`file:///Documents/Travel/passport.pdf`) - For important information
- **Previous itineraries** (`trips://history/barcelona-2023`) - For reference

Instead of manually copying this information, resources let the AI access it directly with user permission. During planning, the AI can check calendar availability, look up weather patterns, and reference travel preferences—all through structured resource access.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"resources let the AI access it directly" sounds more like model-controlled than app-controlled - a clarifying edit might be "resources let the user add it directly to the context" (which gets unpacked in the more detailed description below).

But zooming out, maybe defining resources as app-controlled might be one of the things that's holding adoption of resources back?

E.g. I'm deciding between weather://forecast/{city}/{date} and get_weather(city, date) and the former requires the user (via an app UI) to add the weather to the context explicitly, rather than letting the model discover and choose get_weather.

Partly I'm thinking this through myself, but I'm also channeling the doc reader who might at this point have the same question. I think a having a brief high-level "Tools vs Resources: how to choose" section on this page might be really useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Tools vs Resources: how to choose" I'll do it as a separate PR

- `calendar://my-calendar/June-2024` (from Calendar Server)
- `travel://preferences/europe` (from Travel Server)
- `travel://past-trips/Spain-2023` (from Travel Server)
- `weather://forecast/Barcelona/2024-06` (from Weather Server)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apropos of the resources vs tools comment above (and the bigger question of how resources are really used) - is this realistic? It seems like "I'm thinking of planning a vacation, idk Barcelona? What's the weather like there rn" in a chatbot (+ model-driven tool calls to e.g. get_weather) is the way it would actually be done, rather than picking city out of an app modal and typing in a date.

TBH I can't think of a good use "typical" case for parameterized resources, they all turn into tools in my mind - it's because for examples like weather and calendar, "app-controlled" implies it's the user doing the parameterization via app UI, which seems cumbersome compared to the model translating natural language into parameters. (For direct resources it's easier, e.g. here's my passport.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, maybe we can have a simpler example of past travel - as this is something user wants to select

@ihrpr ihrpr merged commit 87651b5 into docs/develop Jul 14, 2025
4 checks passed
@ihrpr ihrpr deleted the ihrpr/servers-concepts branch July 14, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants