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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search keywords in English. Any non-English input will be auto-translated to English before populating this field. |
Implementation Reference
- src/owlpay_mcp_server/server.py:36-53 (handler)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.")
- src/owlpay_mcp_server/server.py:69-77 (registration)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(), ) ]
- src/owlpay_mcp_server/server.py:57-62 (handler)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)
- src/owlpay_mcp_server/server.py:95-105 (handler)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)]