Skip to content

Conversation

@stephentoub
Copy link
Contributor

We can add static analysis to provide compile-time diagnostics later, once the analyzers project is merged. For now, this adds run-time validation.

Closes #935

We can add static analysis to provide compile-time diagnostics later, once the analyzers project is merged. For now, this adds run-time validation.
@PederHP
Copy link
Member

PederHP commented Nov 6, 2025

It's missing forward slash I believe?

@stephentoub
Copy link
Contributor Author

It's missing forward slash I believe?

Can you clarify?

The spec states:
Tool names SHOULD be between 1 and 128 characters in length (inclusive).
Tool names SHOULD be considered case-sensitive.
The following SHOULD be the only allowed characters: uppercase and lowercase ASCII letters (A-Z, a-z), digits (0-9), underscore (_), dash (-), and dot (.)

@PederHP
Copy link
Member

PederHP commented Nov 6, 2025

It's missing forward slash I believe?

Can you clarify?

The spec states: Tool names SHOULD be between 1 and 128 characters in length (inclusive). Tool names SHOULD be considered case-sensitive. The following SHOULD be the only allowed characters: uppercase and lowercase ASCII letters (A-Z, a-z), digits (0-9), underscore (_), dash (-), and dot (.)

modelcontextprotocol/modelcontextprotocol#986

  • Tool names SHOULD be between 1 and 64 characters in length (inclusive).

  • Tool names are case-sensitive.

  • Allowed characters: uppercase and lowercase ASCII letters (A-Z, a-z), digits
    (0-9), underscore (_), dash (-), dot (.), and forward slash (/).

  • Tool names SHOULD NOT contain spaces, commas, or other special characters.

  • Tool names SHOULD be unique within their namespace.

  • Example valid tool names:

    • getUser
    • user-profile/update
    • DATA_EXPORT_v2
    • admin.tools.list

@stephentoub
Copy link
Contributor Author

modelcontextprotocol/modelcontextprotocol#986

That's not what was merged:
https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/draft/server/tools.mdx#tool-names

Tool names SHOULD be between 1 and 128 characters in length (inclusive).
Tool names SHOULD be considered case-sensitive.
The following SHOULD be the only allowed characters: uppercase and lowercase ASCII letters (A-Z, a-z), digits (0-9), underscore (_), dash (-), and dot (.)
Tool names SHOULD NOT contain spaces, commas, or other special characters.
Tool names SHOULD be unique within a server.
Example valid tool names:
getUser
DATA_EXPORT_v2
admin.tools.list

@stephentoub
Copy link
Contributor Author

Seems like / was vetoed here:
modelcontextprotocol/modelcontextprotocol#1603 (comment)

@stephentoub stephentoub merged commit 5fc50fb into modelcontextprotocol:main Nov 6, 2025
13 of 14 checks passed
@stephentoub stephentoub deleted the namevalidation branch November 6, 2025 13:45
@PederHP
Copy link
Member

PederHP commented Nov 6, 2025

Seems like / was vetoed here: modelcontextprotocol/modelcontextprotocol#1603 (comment)

Ah - makes sense. I thought SEPs were generally updated to reflect the final changes merged in. Rather confusing like this. Sorry for the mixup then, and I learned to go the merge instead of the SEP.

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.

SEP-986: Specify Format for Tool Names

3 participants