Skip to main content
Glama

CRM PDF Documentation Server

by jcruz-impel
test_mcp.py1.09 kB
#!/usr/bin/env python3 """ Test script to verify MCP server functionality """ import sys def test_mcp_tool(tool_name, args=None): """Test an MCP tool by calling it directly""" try: sys.path.append('.') from crm_pdf_server import mcp tools = mcp.get_tools() tool = None for t in tools: if t.name == tool_name: tool = t break if not tool: return f"Tool '{tool_name}' not found" if args: result = tool.function(**args) else: result = tool.function() return result except Exception as e: return f"Error: {str(e)}" if __name__ == "__main__": print("Testing MCP server tools...") print("\n1. Testing list_pdfs():") result = test_mcp_tool("list_pdfs") print(result) print("\n2. Testing get_pdf_info():") result = test_mcp_tool("get_pdf_info") print(result) print("\n3. Testing search_pdfs with 'API':") result = test_mcp_tool("search_pdfs", {"query": "API"}) print(result)

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/jcruz-impel/local-mcp'

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