Get Prompts • AI Agent SDK
get_prompts: List prompt templates advertised by the MCP server.
get_prompts
Method
</div>
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
def get_prompts() -> List[dict]Returns
ResponseField
List[dict]Serialised prompt descriptors with argument hints.
Uses
_res.prompts_to_dicts
Source
View on GitHubpraisonaiagents/mcp/mcp.py at line 1352