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

Method ListPrompts

mcp/client.go:973–975  ·  view source on GitHub ↗

ListPrompts lists prompts that are currently available on the server.

(ctx context.Context, params *ListPromptsParams)

Source from the content-addressed store, hash-verified

971
972// ListPrompts lists prompts that are currently available on the server.
973func (cs *ClientSession) ListPrompts(ctx context.Context, params *ListPromptsParams) (*ListPromptsResult, error) {
974 return handleSend[*ListPromptsResult](ctx, methodListPrompts, newClientRequest(cs, orZero[Params](params)))
975}
976
977// GetPrompt gets a prompt from the server.
978func (cs *ClientSession) GetPrompt(ctx context.Context, params *GetPromptParams) (*GetPromptResult, error) {

Callers 3

TestEndToEndFunction · 0.80
TestNoJSONNullFunction · 0.80
TestListFunction · 0.80

Calls 1

newClientRequestFunction · 0.85

Tested by 3

TestEndToEndFunction · 0.64
TestNoJSONNullFunction · 0.64
TestListFunction · 0.64