We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Geoffrey-42/rag-groundx-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
get_document_in_Groundx.py•711 B
from groundx import AsyncGroundX
from typing import Dict, Any
async def get_document_in_Groundx(
groundx_api_key: str,
document_id: str
) -> Dict[str, Any]:
"""
Look up an existing document by documentId.
See: https://docs.eyelevel.ai/reference/api-reference/documents/get
Args:
groundx_api_key (str): The API key for GroundX authentication.
document_id (str): The documentId of the document for which GroundX information will be provided.
"""
client = AsyncGroundX(api_key=groundx_api_key)
try:
return await client.documents.get(document_id=document_id)
except Exception as e:
return {"error": f"Failed to get document: {str(e)}"}