search_peps
Search active Python Enhancement Proposal (PEP) titles using a query string to find relevant Python language specifications and proposals.
Instructions
Search active PEP titles for a query string.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- src/pep_mcp_server/server.py:19-22 (handler)Registration of the search_peps MCP tool, delegating to the peps_client.
@mcp.tool async def search_peps(query: str) -> list[dict]: """Search active PEP titles for a query string.""" return await peps_client.search_active_peps(query) - src/pep_mcp_server/peps_client.py:39-50 (handler)The actual implementation of searching active PEPs.
async def search_active_peps(self, query: str) -> list[dict[str, Any]]: """Search active PEP titles using case-insensitive substring matching.""" normalized_query = query.strip().lower() if not normalized_query: return [] active = await self.list_active_peps() return [ pep for pep in active if normalized_query in str(pep.get("title", "")).lower() ]