Skip to main content

Module methods

Module methods 

Source
Expand description

Spec-defined method and notification names.

These live in core because they are protocol facts, not server facts. They were previously declared only in mcpkit-server, which left every other crate — core, client, testing, the examples — writing the names as string literals. That is how three separate places shipped a non-spec "initialized", and how the debug validator registered it as a known method.

Use these at any site that sends or matches a method name. Do not use them in tests that assert what the wire name is: an assertion against the constant passes even when the constant is wrong, which is precisely how those defects stayed green. Tests should spell the literal out.

Completeness is enforced against the vendored schema — see mcpkit/tests/protocol_behaviour_conformance.rs.

Modules§

notifications
Spec-defined notification method names.

Constants§

COMPLETION_COMPLETE
Request completion suggestions.
ELICITATION_CREATE
Create an elicitation request.
INITIALIZE
Initialize the connection and negotiate capabilities.
LOGGING_SET_LEVEL
Set the logging level.
PING
Ping to check if the connection is alive.
PROMPTS_GET
Get a specific prompt with arguments.
PROMPTS_LIST
List available prompts.
RESOURCES_LIST
List available resources.
RESOURCES_READ
Read the contents of a resource.
RESOURCES_SUBSCRIBE
Subscribe to resource updates.
RESOURCES_TEMPLATES_LIST
List available resource templates.
RESOURCES_UNSUBSCRIBE
Unsubscribe from resource updates.
ROOTS_LIST
List the roots the client exposes.
SAMPLING_CREATE_MESSAGE
Request the client to sample from a language model.
TASKS_CANCEL
Cancel a running task.
TASKS_GET
Get status of a specific task.
TASKS_LIST
List running tasks.
TASKS_RESULT
Retrieve a terminal task’s payload (blocks until terminal, per spec).
TOOLS_CALL
Call a specific tool with arguments.
TOOLS_LIST
List available tools.