listContentNames
Retrieve content names from an organization's database, with optional filtering to find specific entries.
Instructions
List all content names from the organization's database optionally filtered by name
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional name filter to search for specific content |
Implementation Reference
- rag_tools.py:14-24 (handler)Core implementation of the listContentNames tool handler. Calls rag_service to get contents filtered by optional name.
def list_content_names(self, name: str | None = None) -> list[dict[str, Any]]: """ List all content names from the organization's database optionally filtered by name. Args: name: Optional name filter to search for specific content Returns: List of content objects """ return self.rag_service.get_all_contents(name, self.user_id_from_environment) - mcp_server.py:45-58 (registration)Tool registration in MCP list_tools handler, defining name, description, and input schema.
name="listContentNames", description="List all content names from the organization's database optionally filtered by name", inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Optional name filter to search for specific content" } }, "additionalProperties": False } ), types.Tool( - mcp_server.py:48-56 (schema)JSON schema for input validation of listContentNames tool.
"type": "object", "properties": { "name": { "type": "string", "description": "Optional name filter to search for specific content" } }, "additionalProperties": False } - mcp_server.py:145-148 (handler)Dispatch handler in MCP call_tool that invokes the rag_tools.list_content_names method.
if name == "listContentNames": result = rag_tools.list_content_names(arguments.get("name")) logger.debug(f"Tool {name} executed successfully") return [types.TextContent(type="text", text=str(result))]