Skip to main content
Glama
OwlTing

OwlPay MCP Server

by OwlTing

search_owlpay_documentation

Search OwlPay API documentation and guides using natural language queries to accelerate system integration. Non-English queries are automatically translated to English.

Instructions

Search Owlpay documentation. Any non-English input will be auto-translated to English before populating the query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch keywords in English. Any non-English input will be auto-translated to English before populating this field.

Implementation Reference

  • Core handler function implementing the tool logic by making an HTTP request to the OwlPay documentation search API.
    def search_owlpay_documentation_func(query: str) -> str:
        """Call external Owlpay API and return raw text or raise McpError."""
        try:
            session = requests.Session()
            session.mount("http://", HTTPAdapter(max_retries=3))
            resp = session.get(
                SEARCH_API, params={"query": query}, timeout=30
            )
            resp.raise_for_status()
            return resp.text
        except Exception as e:
            raise McpError(
                ErrorData(
                    code=INTERNAL_ERROR,
                    message=f"Failed to search documentation: {e!r}",
                )
            )
  • Pydantic model defining the input schema for the search_owlpay_documentation tool.
    class SearchArgs(BaseModel):
        """Parameters for searching Owlpay documentation."""
        query: str = Field(..., description="Search keywords in English. Any non-English input will be auto-translated to English before populating this field.")
  • Registers the search_owlpay_documentation tool in the stdio MCP server, providing name, description, and schema.
    @server.list_tools()
    async def list_tools() -> list[Tool]:
        return [
            Tool(
                name="search_owlpay_documentation",
                description="Search Owlpay documentation. Any non-English input will be auto-translated to English before populating the query.",
                inputSchema=SearchArgs.model_json_schema(),
            )
        ]
  • FastMCP tool handler for search_owlpay_documentation, delegating to the core function.
    @mcp.tool(description='Search Owlpay documentation. Any non-English input will be auto-translated to English before populating the query.')
    def search_owlpay_documentation(
        query: Annotated[str, Field(description="Search keywords in English. Any non-English input will be auto-translated to English before populating this field.")]
    ) -> str:
        """Search Owlpay documentation with direct query parameter."""
        return search_owlpay_documentation_func(query)
  • MCP stdio server's call_tool handler that validates input using schema and invokes the core search function.
    @server.call_tool()
    async def call_tool(
        name: str, arguments: dict[str, Any] | None
    ) -> list[TextContent]:
        try:
            args = SearchArgs(**(arguments or {}))
        except ValueError as e:
            raise McpError(ErrorData(code=INVALID_PARAMS, message=str(e)))
    
        result = search_owlpay_documentation_func(args.query)
        return [TextContent(type="text", text=result)]
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/OwlTing/owlpay_mcp_server'

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