Get Prompts • AI Agent SDK

get_prompts: List prompt templates advertised by the MCP server.

get_prompts

Method

</div>

This is a method of the MCP class in the mcp module.

List prompt templates advertised by the MCP server.

Returns an empty list for transports that do not surface prompts or for servers that expose none.

Signature

python
def get_prompts() -> List[dict]

Returns

ResponseField List[dict]

Serialised prompt descriptors with argument hints.

Uses

  • _res.prompts_to_dicts

Source

View on GitHub

praisonaiagents/mcp/mcp.py at line 1352