# Ragie — how to use (mcp.ai)

Connect your Ragie account and use 31 tools for developer tools straight from your AI agent. Connect with your own API key. Fully managed RAG-as-a-Service for developers.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_ragie?ms=1787291280000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `ragie_create_document`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/ragie`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/ragie/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/ragie/create/document` — Tool to upload and process a document file in Ragie. Use when you need to create a new document with support for various formats including text, images, and documents. The endpoint accepts multipart/f
  - body: { file?: object, mode?: string|boolean, name?: string, metadata?: object, partition?: string, rawContent?: string, external_id?: string, rawFilename?: string, rawMimetype?: string }
- `POST https://api.mcp.ai/api/ragie/create/document/from/url` — Tool to ingest a document from a publicly accessible URL. Use when you need to add documents to Ragie from external sources. The document undergoes processing steps (pending, partitioning, indexed, re
  - body: { url: string, mode?: string|object, name?: string, metadata?: object, partition?: string, external_id?: string }
- `POST https://api.mcp.ai/api/ragie/create/document/raw` — Tool to ingest a document as raw text or JSON. Use when creating a new document from text or JSON data. The document goes through processing steps and becomes available for retrieval once in the ready
  - body: { data: string|object, name?: string, metadata?: object, partition?: string, external_id?: string }
- `POST https://api.mcp.ai/api/ragie/create/instruction` — Tool to create a new instruction that applies natural language directives to documents as they're ingested or updated. Use when you need to define structured data extraction or analysis rules for docu
  - body: { name: string, scope?: string, active?: boolean, filter?: object, prompt: string, partition?: string, entity_schema: object }
- `POST https://api.mcp.ai/api/ragie/create/oauth/redirect/url` — Tool to create an OAuth redirect URL for initializing embedded connector OAuth flows. Use when you need to set up OAuth authentication for connectors like Google Drive, Notion, or HubSpot.
  - body: { mode?: string, theme?: string, config?: object, metadata?: object, partition?: string, page_limit?: integer, source_type?: string, redirect_uri: string, authenticator_id?: string }
- `POST https://api.mcp.ai/api/ragie/create/partition/partitions/post` — Tool to create a new partition for scoping documents and connections in Ragie. Use when you need to organize documents and set resource limits for different workspaces or tenants.
  - body: { name: string, description?: string, metadata_schema?: object, media_hosted_limit_max?: integer, pages_hosted_limit_max?: integer, media_streamed_limit_max?: integer, audio_processed_limit_max?: integer, pages_processed_limit_max?: integer, video_processed_limit_max?: integer, media_hosted_limit_monthly?: integer, pages_hosted_limit_monthly?: integer, media_streamed_limit_monthly?: integer, audio_processed_limit_monthly?: integer, pages_processed_limit_monthly?: integer, video_processed_limit_monthly?: integer }
- `POST https://api.mcp.ai/api/ragie/delete/document` — Tool to delete a document from Ragie. Use when you need to remove a document permanently from the system. Supports both synchronous and asynchronous deletion modes.
  - body: { async?: boolean, partition?: string, document_id: string }
- `POST https://api.mcp.ai/api/ragie/delete/instruction` — Tool to delete an instruction and all associated entities. Use when you need to permanently remove an instruction (irreversible operation). Requires the instruction ID (UUID format).
  - body: { instruction_id: string }
- `POST https://api.mcp.ai/api/ragie/delete/partition` — Tool to delete a partition and all associated data irreversibly. Use when you need to permanently remove a partition. Returns status 200 for synchronous deletion or 202 for asynchronous deletion.
  - body: { partition_id: string, async_deletion?: boolean }
- `POST https://api.mcp.ai/api/ragie/get/document` — Tool to retrieve a specific document by its unique identifier. Use when you need to get document details, metadata, processing status, or check for errors. Returns comprehensive document information i
  - body: { partition?: string, document_id: string }
- `POST https://api.mcp.ai/api/ragie/get/document/chunk` — Tool to retrieve a specific document chunk by its document and chunk ID. Use when you need detailed information about a specific chunk within a document, including its content, metadata, position inde
  - body: { chunk_id: string, partition?: string, document_id: string }
- `POST https://api.mcp.ai/api/ragie/get/document/chunk/content` — Tool to retrieve document chunk content in requested format with streaming support for media. Use when you need to get the actual content of a specific chunk from a document.
  - body: { chunk_id: string, download?: boolean, partition?: string, media_type?: string, document_id: string, range_header?: string }
- `POST https://api.mcp.ai/api/ragie/get/document/chunks` — Tool to retrieve document chunks with pagination support. Lists all document chunks sorted by index in ascending order (max 100 items per page). Documents created prior to 9/18/2024 that have not been
  - body: { cursor?: string, end_index?: integer, page_size?: integer, partition?: string, document_id: string, start_index?: integer }
- `POST https://api.mcp.ai/api/ragie/get/document/content` — Tool to retrieve the content of a document by its ID. Use when you need to access the full content of a specific document. The media_type parameter can be used to request content in different formats.
  - body: { range?: string, download?: boolean, partition?: string, media_type?: string, document_id: string }
- `POST https://api.mcp.ai/api/ragie/get/document/summary` — Tool to retrieve an LLM-generated summary of a document by its ID. Use when you need to get a concise summary of a document's content.
  - body: { partition?: string, document_id: string }
- `POST https://api.mcp.ai/api/ragie/get/partition` — Tool to retrieve a partition by ID with usage statistics and resource limits. Use when you need to get detailed information about a specific partition.
  - body: { partition_id: string }
- `POST https://api.mcp.ai/api/ragie/get/response` — Tool to retrieve a response by its unique identifier. Use when you need to check the status or details of a previously created response.
  - body: { response_id: string }
- `POST https://api.mcp.ai/api/ragie/list/connection/source/types` — Tool to list available connection source types like 'google_drive' and 'notion' along with their metadata. Use when you need to discover what connector types are available in Ragie.
- `POST https://api.mcp.ai/api/ragie/list/connections/connections/get` — Tool to list all connections sorted by creation date descending with pagination support. Use when you need to retrieve connections, optionally filtered by metadata.
  - body: { cursor?: string, filter?: string, page_size?: integer, partition?: string }
- `POST https://api.mcp.ai/api/ragie/list/documents` — Tool to list all documents sorted by creation date (descending) with pagination support. Use when you need to browse or retrieve document metadata. Supports filtering and pagination up to 100 items pe
  - body: { cursor?: string, filter?: string, page_size?: integer, partition?: string }
- `POST https://api.mcp.ai/api/ragie/list/entities/by/document` — Tool to retrieve all extracted entities from a specific document with pagination support. Use when you need to access structured data that has been extracted from a document by Ragie's entity extracti
  - body: { cursor?: string, page_size?: integer, partition?: string, document_id: string }
- `POST https://api.mcp.ai/api/ragie/list/entities/by/instruction` — Tool to retrieve entities generated by a specific instruction. Use when you need to fetch entities extracted from documents based on a specific instruction's processing.
  - body: { cursor?: string, page_size?: integer, partition?: string, instruction_id: string }
- `POST https://api.mcp.ai/api/ragie/list/instructions` — Tool to retrieve all instruction records from the Ragie system. Use when you need to view all available instructions that define natural language prompts and entity schemas applied to documents.
- `POST https://api.mcp.ai/api/ragie/list/partitions` — Tool to retrieve a paginated list of all partitions sorted by name in ascending order. Use when you need to list available partitions with their configurations and limits.
  - body: { cursor?: string, page_size?: integer }
- `POST https://api.mcp.ai/api/ragie/patch/document/metadata` — Tool to update metadata for a specific document with partial update support. Use when you need to modify document metadata fields without replacing the entire metadata object. Supports both synchronou
  - body: { async?: boolean, metadata: object, partition?: string, document_id: string }
- `POST https://api.mcp.ai/api/ragie/retrieve` — Tool to retrieve relevant document chunks based on a query. Use when you need to search and retrieve document content that matches a specific query, with optional filtering and reranking capabilities.
  - body: { query: string, top_k?: integer, filter?: object, rerank?: boolean, partition?: string, recency_bias?: boolean, max_chunks_per_document?: integer }
- `POST https://api.mcp.ai/api/ragie/set/partition/limits` — Tool to set usage limits on partition pages and media. Use when you need to configure monthly or maximum limits for pages processed/hosted, video/audio processing, or media streaming/hosting for a spe
  - body: { partition_id: string, media_hosted_limit_max?: integer, pages_hosted_limit_max?: integer, media_streamed_limit_max?: integer, audio_processed_limit_max?: integer, pages_processed_limit_max?: integer, video_processed_limit_max?: integer, media_hosted_limit_monthly?: integer, pages_hosted_limit_monthly?: integer, media_streamed_limit_monthly?: integer, audio_processed_limit_monthly?: integer, pages_processed_limit_monthly?: integer, video_processed_limit_monthly?: integer }
- `POST https://api.mcp.ai/api/ragie/update/document/from/url` — Tool to update an existing document by fetching content from a publicly accessible URL. Use when you need to refresh or replace a document's content with data from a web URL. The document goes through
  - body: { url: string, mode?: string|object, partition?: string, document_id: string }
- `POST https://api.mcp.ai/api/ragie/update/document/raw` — Tool to update a document's content from raw text or JSON data. Use when modifying existing document content. The document undergoes processing and becomes available for retrieval once it reaches the 
  - body: { data: string|object, document_id: string }
- `POST https://api.mcp.ai/api/ragie/update/instruction` — Tool to update an instruction's active status. Use when you need to activate or deactivate an existing instruction.
  - body: { active: boolean, instruction_id: string }
- `POST https://api.mcp.ai/api/ragie/update/partition` — Tool to update a partition's configuration including description, context-aware settings, and metadata schema. Use when you need to modify an existing partition's settings.
  - body: { description?: string, partition_id: string, context_aware?: boolean, metadata_schema?: object }

## Example prompts
- "What can I do in Ragie?"
- "Show me a summary of my Ragie account"

## More
- Page: https://mcp.ai/ragie
- Agent spec (llms.txt): https://mcp.ai/ragie/llms.txt
- Postman collection: https://mcp.ai/ragie/postman.json
