Skip to main content
Glama
omniwaifu

Pydantic AI Documentation Server

by omniwaifu

update_documentation

Update and rebuild the Pydantic AI documentation search index by cloning the repository and parsing documentation files.

Instructions

Clones/updates the Pydantic repo, parses docs, and rebuilds the search index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
force_cloneNo

Implementation Reference

  • The implementation of the `update_documentation` tool, which orchestrates cloning/updating the repository and returning a status response.
    @app.tool()
    async def update_documentation(force_clone: bool = False) -> StatusResponse:
        """Clones/updates the Pydantic repo, parses docs, and rebuilds the search index."""
        logger.info(f"update_documentation called with force_clone={force_clone}")
        try:
            repo_update_result = clone_or_pull_repository(force_clone)
            logger.info(f"Repository update result: {repo_update_result}")
    
            if repo_update_result.get("status") == "error":
                return StatusResponse(
                    status="error",
                    message=repo_update_result.get("message", "Repository update failed"),
                    data=repo_update_result,
                )
    
            commit_hash = get_current_commit_hash()
    
            return StatusResponse(
                status="success",
                message=f"Documentation updated successfully from commit {commit_hash}.",
                data={"commit_hash": commit_hash},
            )
    
        except Exception as e:
            logger.error(f"Error in update_documentation: {e}", exc_info=True)
            return StatusResponse(
                status="error", message=str(e), data={"error_details": str(e)}
            )

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/omniwaifu/pydantic-ai-docs-server'

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