searchOrganizationContents
Search an organization's content database using semantic queries to locate relevant information efficiently.
Instructions
Search through the organization's content database using semantic search
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query |
Implementation Reference
- mcp_server.py:58-72 (registration)Registration of the searchOrganizationContents tool in the list_tools() function, including its name, description, and input schema.types.Tool( name="searchOrganizationContents", description="Search through the organization's content database using semantic search", inputSchema={ "type": "object", "properties": { "query": { "type": "string", "description": "The search query" } }, "required": ["query"], "additionalProperties": False } ),
- mcp_server.py:61-71 (schema)Input schema for the searchOrganizationContents tool, defining a required 'query' parameter of type string.inputSchema={ "type": "object", "properties": { "query": { "type": "string", "description": "The search query" } }, "required": ["query"], "additionalProperties": False }
- rag_tools.py:26-36 (handler)The handler function implementing the core logic of the searchOrganizationContents tool by invoking RagService.search_contents with the query and user ID.def search_organization_contents(self, query: str) -> list[str]: """ Search through the organization's content database using semantic search. Args: query: The search query (required) Returns: List of search results """ return self.rag_service.search_contents(query, self.user_id_from_environment)
- mcp_server.py:150-155 (helper)Dispatch logic in the call_tool handler that validates input and invokes the search_organization_contents method.elif name == "searchOrganizationContents": if "query" not in arguments: raise ValueError("Query parameter is required") result = rag_tools.search_organization_contents(arguments["query"]) logger.debug(f"Tool {name} executed successfully") return [types.TextContent(type="text", text=str(result))]