MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / GetPrompt

Method GetPrompt

mcp/client.go:978–980  ·  view source on GitHub ↗

GetPrompt gets a prompt from the server.

(ctx context.Context, params *GetPromptParams)

Source from the content-addressed store, hash-verified

976
977// GetPrompt gets a prompt from the server.
978func (cs *ClientSession) GetPrompt(ctx context.Context, params *GetPromptParams) (*GetPromptResult, error) {
979 return handleSend[*GetPromptResult](ctx, methodGetPrompt, newClientRequest(cs, orZero[Params](params)))
980}
981
982// ListTools lists tools that are currently available on the server.
983func (cs *ClientSession) ListTools(ctx context.Context, params *ListToolsParams) (*ListToolsResult, error) {

Callers 4

TestEndToEndFunction · 0.80
Example_promptsFunction · 0.80
TestServerErrorsFunction · 0.80

Calls 1

newClientRequestFunction · 0.85

Tested by 4

TestEndToEndFunction · 0.64
Example_promptsFunction · 0.64
TestServerErrorsFunction · 0.64