Skip to main content
Glama

list_documents_tool

View all indexed documents in the PinRAG vector store, including PDFs, videos, GitHub repos, and Discord exports, with optional tag filtering.

Instructions

List all indexed documents in the PinRAG index.

Returns unique document IDs (PDF file names, video IDs, discord-alicia-1200-pcb, owner/repo/path for GitHub, etc.)
currently in the vector store, plus total chunk count. Uses server config
for vector store location and collection.

Args:
    tag: Optional tag to filter: only list documents that have this tag.
    ctx: MCP request context (injected by the server; unused).

Returns:
    Dictionary containing documents, total_chunks, persist_directory,
    collection_name, document_details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoOptional tag to filter: only list documents that have this tag.

Implementation Reference

  • The implementation of list_documents_tool which calls list_documents function in a separate thread.
    async def list_documents_tool(
        tag: Annotated[
            str,
            Field(
                description="Optional tag to filter: only list documents that have this tag."
            ),
        ] = "",
        ctx: Context | None = None,
    ) -> dict:
        """List all indexed documents in the PinRAG index.
    
        Returns unique document IDs (PDF file names, video IDs, discord-alicia-1200-pcb, owner/repo/path for GitHub, etc.)
        currently in the vector store, plus total chunk count. Uses server config
        for vector store location and collection.
    
        Args:
            tag: Optional tag to filter: only list documents that have this tag.
            ctx: MCP request context (injected by the server; unused).
    
        Returns:
            Dictionary containing documents, total_chunks, persist_directory,
            collection_name, document_details.
    
        """
    
        def _run() -> dict:
            return list_documents(
                persist_dir=config.get_persist_dir(),
                collection=config.get_collection_name(),
                tag=tag or None,
            )
    
        return await anyio.to_thread.run_sync(_run)

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/ndjordjevic/pinrag'

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