Skip to content

Add check for SEP-986 (tool name format) #238

@nbarbettini

Description

@nbarbettini

Summary

SEP-986 and the current spec pin tool names to a specific format: 1–64 characters from [A-Za-z0-9_.\/-]. No existing scenario validates this: ToolsListScenario in src/scenarios/server/tools.ts only checks that name is truthy. Since tool name validity is inherent to every tools/list response, the natural home is an additional check on the existing ToolsListScenario.

Missing Coverage

Check: tools-name-format

Spec: Tool names are 1–64 characters long and match ^[A-Za-z0-9_.\/-]+$.

After tools/list, for each tool in result.tools, validate tool.name against the length bound and character class. Report FAILURE when any advertised tool name violates the format, with a per-tool breakdown in details. If result.tools is empty, report INFO (no tools to validate).

Proposed Location

Add as an additional check within the existing ServerToolsListScenario in src/scenarios/server/tools.ts, rather than a new standalone scenario.

The existing tools-list check already iterates result.tools.forEach(...) to validate presence of name/description/inputSchema, so the format validation slots in alongside the if (!tool.name) branch at tools.ts:48.

Spec Requirements (Tool Definition)

Keyword Statement
MUST Each tool's name is a non-empty string
MUST Tool names MUST be 1–64 characters long
MUST Tool names MUST match the regex ^[A-Za-z0-9_.\/-]+$ (letters, digits, underscore, hyphen, period, forward slash)
SHOULD Tool names SHOULD be stable across server restarts for client-side caching

Spec References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions