Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • 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)
  • 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()
        ]
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ribbit-br/mcp-pep-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server