Skip to main content
Glama

search_in_project

Search within a Document360 project version to find related articles and categories.

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)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the search_in_project tool logic. It calls client.search_project_version() and returns the hits from the result.
    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:73-87 (registration)
    MCP tool registration in server.py using @mcp.tool decorator. Defines the tool's schema (project_version_id parameter) and delegates to tools.search_in_project().
    @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)
  • The underlying API client method search_project_version() that calls GET /v2/ProjectVersions/{projectVersionId}/{langCode} on the Document360 API.
    async def search_project_version(self, project_version_id: str) -> Dict[str, Any]:
        """Search inside a project version (returns hits and metadata)
    
        Uses the /v2/ProjectVersions/{projectVersionId}/{langCode} endpoint which returns
        search hits (articles/categories) for the given project version.
        """
        return await self._request("GET", f"/ProjectVersions/{project_version_id}/{config.langcode}")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but provides minimal transparency. It lacks details on side effects, authentication requirements, rate limits, or the nature of the search (e.g., fuzzy matching). The return is vaguely described as 'related articles/categories' without explaining what 'related' means.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively short but includes redundant format (Args/Returns mimicking function signature) that adds little value. The core purpose is front-loaded, but the inclusion of 'ctx' is unnecessary for an MCP agent. Could be more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple one-parameter tool, the description covers the basic function, but misses behavioral details like partial matches, result ordering, or error behavior. The presence of an output schema (per context signals) mitigates some completeness issues, but the description itself is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already describes the parameter as a UUID string. The description repeats this without adding new information or context. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool's action (search), the resource (project version), and the return type (related articles/categories). It distinguishes from sibling tools like get_article and get_category by focusing on search across the project version.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs alternatives. Usage can be inferred from the description and sibling tool names, but no direct contrast or conditions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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