Skip to main content
Glama

search_in_project

Search within a Document360 project version to find specific articles or categories using a project version ID. This tool helps locate relevant knowledge base content by querying the project's search endpoint.

Instructions

Search inside a project version and return related articles/categories in Document360

Args: project_version_id: Document360 project version ID (UUID string) ctx: MCP context for logging and error handling

Returns: List of hits (articles/categories) from the project version search endpoint

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_version_idYesDocument360 project version ID (UUID string)

Implementation Reference

  • Core handler implementation for the search_in_project tool. Performs search in Document360 project version using the client API, extracts hits, logs via ctx, and handles errors.
    async def search_in_project(project_version_id: str, ctx: Context) -> Dict[str, Any]:
        """Search inside a project version and return hits
    
        Args:
            project_version_id: Document360 project version ID (UUID string)
            ctx: MCP context for logging and error handling
    
        Returns:
            The raw response from /v2/ProjectVersions/{projectVersionId}/{langCode}, typically contains 'data.hits'
        """
        try:
            await ctx.info(f"Searching in project version: {project_version_id}")
    
            result = await client.search_project_version(project_version_id)
    
            hits = result.get('data', {}).get('hits', [])
    
            await ctx.info(f"Found {len(hits)} hits in project version {project_version_id}")
            return {'data': hits, 'success': True}
    
        except Document360APIError as e:
            await ctx.error(f"Document360 API error during project search: {e.message}")
            raise e
        except Exception as e:
            await ctx.error(f"Unexpected error during project search: {str(e)}")
            raise e
  • server.py:74-88 (registration)
    MCP tool registration for search_in_project, including schema definitions via Annotated types and Field descriptions, and docstring. Delegates to the core implementation in tools.py.
    @mcp.tool
    async def search_in_project(
        project_version_id: Annotated[str, Field(description="Document360 project version ID (UUID string)")],
        ctx: Context
    ) -> dict:
        """Search inside a project version and return related articles/categories in Document360
    
        Args:
            project_version_id: Document360 project version ID (UUID string)
            ctx: MCP context for logging and error handling
    
        Returns:
            List of hits (articles/categories) from the project version search endpoint
        """
        return await tools.search_in_project(project_version_id, ctx)

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/druellan/document360-mcp'

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