Class RequestMethods | MCP C# SDK

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Provides constants with the names of common request methods used in the MCP protocol.

public static class RequestMethods
Inheritance

RequestMethods

Inherited Members

Fields

CompletionComplete

The name of the request method sent from the client to the server to ask for completion suggestions.

public const string CompletionComplete = "completion/complete"

Field Value

string

ElicitationCreate

The name of the request method sent from the server to elicit additional information from the user via the client.

public const string ElicitationCreate = "elicitation/create"

Field Value

string

Initialize

The name of the request method sent from the client to the server when it first connects, asking it to initialize.

public const string Initialize = "initialize"

Field Value

string

LoggingSetLevel

The name of the request method sent from the client to the server to adjust the logging level.

public const string LoggingSetLevel = "logging/setLevel"

Field Value

string

Ping

The name of the request method sent by either endpoint to check that the connected endpoint is still alive.

public const string Ping = "ping"

Field Value

string

PromptsGet

The name of the request method sent by the client to get a prompt provided by the server.

public const string PromptsGet = "prompts/get"

Field Value

string

PromptsList

The name of the request method sent from the client to request a list of the server's prompts.

public const string PromptsList = "prompts/list"

Field Value

string

ResourcesList

The name of the request method sent from the client to request a list of the server's resources.

public const string ResourcesList = "resources/list"

Field Value

string

ResourcesRead

The name of the request method sent from the client to read a specific server resource.

public const string ResourcesRead = "resources/read"

Field Value

string

ResourcesSubscribe

The name of the request method sent from the client to request ResourceUpdatedNotification notifications from the server whenever a particular resource changes.

public const string ResourcesSubscribe = "resources/subscribe"

Field Value

string

ResourcesTemplatesList

The name of the request method sent from the client to request a list of the server's resource templates.

public const string ResourcesTemplatesList = "resources/templates/list"

Field Value

string

ResourcesUnsubscribe

The name of the request method sent from the client to request unsubscribing from ResourceUpdatedNotification notifications from the server.

public const string ResourcesUnsubscribe = "resources/unsubscribe"

Field Value

string

RootsList

The name of the request method sent from the server to request a list of the client's roots.

public const string RootsList = "roots/list"

Field Value

string

SamplingCreateMessage

The name of the request method sent from the server to sample a large language model (LLM) via the client.

public const string SamplingCreateMessage = "sampling/createMessage"

Field Value

string

TasksCancel

The name of the request method to explicitly cancel a task.

public const string TasksCancel = "tasks/cancel"

Field Value

string

TasksGet

The name of the request method to retrieve task status.

public const string TasksGet = "tasks/get"

Field Value

string

TasksList

The name of the request method to retrieve a list of tasks with pagination support.

public const string TasksList = "tasks/list"

Field Value

string

TasksResult

The name of the request method to retrieve the result of a completed task.

public const string TasksResult = "tasks/result"

Field Value

string

ToolsCall

The name of the request method sent from the client to request that the server invoke a specific tool.

public const string ToolsCall = "tools/call"

Field Value

string

ToolsList

The name of the request method sent from the client to request a list of the server's tools.

public const string ToolsList = "tools/list"

Field Value

string