list_loaded_pdfs
View currently loaded PDF files in the PDF Redaction MCP Server to manage documents for content review and redaction processes.
Instructions
List all currently loaded PDF files.
Returns: List of loaded PDF file paths
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/redact_mcp/server.py:360-377 (handler)The handler function for the 'list_loaded_pdfs' tool. It is decorated with @mcp.tool, which handles registration in FastMCP. The function lists all loaded PDFs from the global _loaded_pdfs dictionary, including page counts, or returns a message if none are loaded.@mcp.tool async def list_loaded_pdfs(ctx: Context = None) -> str: """List all currently loaded PDF files. Returns: List of loaded PDF file paths """ if not _loaded_pdfs: return "No PDFs currently loaded." loaded_list = "\n".join( f"- {path} ({len(doc)} pages)" for path, doc in _loaded_pdfs.items() ) await ctx.info(f"Currently {len(_loaded_pdfs)} PDF(s) loaded") return f"Currently loaded PDFs:\n{loaded_list}"