Skip to content

Commit e40f499

Browse files
spec/docs: specify tool name format SEP-986 (modelcontextprotocol#1603)
Co-authored-by: Kent C. Dodds <[email protected]>
1 parent e2a0856 commit e40f499

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

docs/docs/develop/build-client.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ When you submit a query:
392392
- Validate server responses
393393
- Be cautious with tool permissions
394394

395+
4. **Tool Names**
396+
- Tool names can be validated according to the format specified [here](/specification/draft/server/tools#tool-names)
397+
- If a tool name conforms to the specified format, it should not fail validation by an MCP client
398+
395399
## Troubleshooting
396400

397401
### Server Path Issues

docs/docs/develop/build-server.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Writing to stdout will corrupt the JSON-RPC messages and break your server.
5959
### Best Practices
6060

6161
1. Use a logging library that writes to stderr or files.
62+
1. Tool names should follow the format specified [here](/specification/draft/server/tools#tool-names).
6263

6364
### Quick Examples
6465

docs/specification/draft/server/tools.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,19 @@ tool annotations to be untrusted unless they come from trusted servers.
204204

205205
</Warning>
206206

207+
#### Tool Names
208+
209+
- Tool names SHOULD be between 1 and 128 characters in length (inclusive).
210+
- Tool names SHOULD be considered case-sensitive.
211+
- The following SHOULD be the only allowed characters: uppercase and lowercase ASCII letters (A-Z, a-z), digits
212+
(0-9), underscore (\_), dash (-), and dot (.)
213+
- Tool names SHOULD NOT contain spaces, commas, or other special characters.
214+
- Tool names SHOULD be unique within a server.
215+
- Example valid tool names:
216+
- getUser
217+
- DATA_EXPORT_v2
218+
- admin.tools.list
219+
207220
### Tool Result
208221

209222
Tool results may contain [**structured**](#structured-content) or **unstructured** content.

0 commit comments

Comments
 (0)