Skip to main content
Glama

accept_document

Manually approve a parsed document for inclusion in a traceable documentary corpus, enabling quality control before indexing for RAG systems.

Instructions

Force a manual accept decision for a parsed document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsYes

Implementation Reference

  • The handler function that executes the accept_document tool logic by calling orchestrator.override_decision.
    def _accept_document(orchestrator: Orchestrator, _db: Session, _settings: AppSettings, arguments: dict[str, Any]) -> Any:
        decision = orchestrator.override_decision(arguments["document_id"], accepted=True)
        return {"parsed_document_id": arguments["document_id"], "decision_status": decision.status}
  • The MCP tool registration and schema definition for 'accept_document'.
    ToolDefinition(
        name="accept_document",
        title="Accept Document",
        description="Force a manual accept decision for a parsed document.",
        version="1.0.0",
        input_schema={"type": "object", "properties": {"document_id": {"type": "string"}}, "required": ["document_id"]},
        output_schema={"type": "object"},
        security=common_security,
        handler=_accept_document,
    ),

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/fbailleux2/kfabric'

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