You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump protocol version to 2025-03-26
Provide fallback value for tool_name
Make configuration per server
Add support for tool annotations
document tool annotations
description:"This tool performs specific functionality...",
195
+
annotations: {
196
+
title:"My Tool",
197
+
read_only_hint:true
198
+
}
199
+
) do |args, context|
200
+
Tool::Response.new([{ type:"text", text:"OK" }])
143
201
end
144
202
```
145
203
146
204
The context parameter is the context passed into the server and can be used to pass per request information,
147
205
e.g. around authentication state.
148
206
207
+
### Tool Annotations
208
+
209
+
Tools can include annotations that provide additional metadata about their behavior. The following annotations are supported:
210
+
211
+
-`title`: A human-readable title for the tool
212
+
-`read_only_hint`: Indicates if the tool only reads data (doesn't modify state)
213
+
-`destructive_hint`: Indicates if the tool performs destructive operations
214
+
-`idempotent_hint`: Indicates if the tool's operations are idempotent
215
+
-`open_world_hint`: Indicates if the tool operates in an open world context
216
+
217
+
Annotations can be set either through the class definition using the `annotations` class method or when defining a tool using the `define` method.
218
+
149
219
## Prompts
150
220
151
221
MCP spec includes [Prompts](https://modelcontextprotocol.io/docs/concepts/prompts), which enable servers to define reusable prompt templates and workflows that clients can easily surface to users and LLMs.
0 commit comments