list_available_projects
Retrieve a JSON-formatted list of cryptocurrency project names from the crypto-whitepapers-mcp knowledge base for analysis or reference.
Instructions
List all cryptocurrency projects available in the knowledge base.
Parameters:
None
Returns:
str: A JSON-formatted list of project names derived from PDF filenames.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function for the 'list_available_projects' tool. It scans the WHITEPAPERS_DIR for PDF files and returns a JSON list of project names derived from the filenames.@mcp.tool() def list_available_projects(ctx: Context) -> str: """List all cryptocurrency projects available in the knowledge base. Parameters: None Returns: str: A JSON-formatted list of project names derived from PDF filenames. """ try: projects = [ os.path.splitext(f)[0] for f in os.listdir(WHITEPAPERS_DIR) if f.endswith(".pdf") ] return json.dumps(projects, indent=2) except Exception as e: return f"Error listing projects: {str(e)}"
- src/crypto_whitepapers_mcp/cli.py:116-116 (registration)The @mcp.tool() decorator registers the list_available_projects function as an MCP tool.@mcp.tool()