# Writer

Writer is a full-stack generative AI platform for enterprises, offering tools to build and deploy AI applications integrated with their suite of LLMs, graph-based RAG tools, and AI guardrails.

- **Category:** artificial intelligence
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 23
- **Triggers:** 0
- **Slug:** `WRITER`
- **Version:** 20260307_00

## Tools

### Add File to Knowledge Graph

**Slug:** `WRITER_ADD_FILE_TO_GRAPH`

Tool to add a file to a knowledge graph for indexing and retrieval. Use when you need to add an uploaded file to an existing knowledge graph for RAG applications.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The unique identifier of the file to add to the knowledge graph |
| `graph_id` | string | Yes | The unique identifier of the knowledge graph to add the file to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Analyze Images

**Slug:** `WRITER_ANALYZE_IMAGES`

Tool to analyze images using Writer's vision capabilities. Use when you need image understanding, text extraction from images, or visual question answering. Images must be uploaded via POST /v1/files before analysis.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | The vision model to use for image analysis. Specify 'palmyra-vision' for Writer's vision model. |
| `prompt` | string | Yes | Text prompt describing what to analyze in the images. Use {{image_name}} placeholders to reference images from the variables array. |
| `variables` | array | Yes | Array of image variables with their names and file IDs. Each image must be uploaded first via POST /v1/files to obtain a file_id. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Ask Question to Knowledge Graph

**Slug:** `WRITER_ASK_QUESTION_TO_KNOWLEDGE_GRAPH`

Tool to send a question to the knowledge graph and retrieve the answer. Use after defining your question and optional context.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `context` | array | No | Optional list of context key/value pairs to provide additional information |
| `question` | string | Yes | The question to ask the knowledge graph |
| `graph_ids` | array | Yes | List of knowledge graph identifiers to target |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Chat Completion

**Slug:** `WRITER_CHAT_COMPLETION`

Tool to generate chat-based completions. Use when you need conversational AI responses; call after assembling system and user messages.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `n` | integer | No | Number of chat completion choices to generate |
| `stop` | string | No | Up to 4 sequences where the API will stop generating further tokens |
| `model` | string | No | Model identifier to use for the chat completion |
| `top_p` | number | No | Nucleus sampling probability threshold |
| `stream` | boolean | No | Whether to stream back partial progress as server-sent events |
| `messages` | array | Yes | Conversation history in order. Required. |
| `max_tokens` | integer | No | Maximum number of tokens to generate |
| `temperature` | number | No | Sampling temperature; higher values produce more random output |
| `presence_penalty` | number | No | Penalty for new tokens based on presence in the text so far |
| `frequency_penalty` | number | No | Penalty for new tokens based on their frequency in the text so far |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Knowledge Graph

**Slug:** `WRITER_CREATE_KNOWLEDGE_GRAPH`

Tool to create a new knowledge graph. Use when you need to create an empty graph that files can be added to.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name of the knowledge graph |
| `description` | string | No | A short description clarifying the graph's purpose for the model |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete File

**Slug:** `WRITER_DELETE_FILE`

Tool to delete a file by its ID. Use when you need to permanently remove a file from Writer with no recovery option available.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The unique identifier of the file to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Graph

**Slug:** `WRITER_DELETE_GRAPH`

Tool to delete a knowledge graph by its ID. Use when you need to remove a graph after confirming its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `graph_id` | string | Yes | Unique identifier of the graph to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Detect AI Content

**Slug:** `WRITER_DETECT_AI_CONTENT`

Tool to detect whether content was generated by AI. Returns a classification label and confidence score indicating the likelihood of AI-generated content. Use when you need to verify content authenticity or identify AI-written text.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `input` | string | Yes | The text to analyze for AI content. Must have at least 350 characters (excluding newline characters). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download File

**Slug:** `WRITER_DOWNLOAD_FILE`

Tool to download the binary content of a file. Use when you need to retrieve file data from the Writer platform. The response contains the file in its original format.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The ID of the file to download. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get File

**Slug:** `WRITER_GET_FILE`

Tool to retrieve detailed information about a specific file by its ID. Use when you need to check a file's metadata, processing status, or associated knowledge graphs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The ID of the file to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Applications

**Slug:** `WRITER_LIST_APPLICATIONS`

Tool to list all no-code agent applications. Use when you need to retrieve all registered applications.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | Cursor for pagination. Use the last_id from a previous response to get the next page. |
| `limit` | integer | No | Maximum number of applications to return (for pagination). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Files

**Slug:** `WRITER_LIST_FILES`

Tool to list all uploaded files. Use when you need to retrieve a paginated set of user files, optionally filtered by status, graph, or type. Use after uploading files to inspect available files.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | Cursor for returning the next page of results; set to the last file ID of the prior page. |
| `limit` | integer | No | Max number of files to return (1-100). Defaults to 50. |
| `order` | string ("asc" | "desc") | No | Sorting order for results: 'asc' (oldest first) or 'desc' (newest first). |
| `before` | string | No | Cursor for returning the previous page of results; set to the first file ID of the prior page. |
| `status` | string ("in_progress" | "completed" | "failed") | No | Filter files by status. |
| `graph_id` | string | No | Filter files by a specific knowledge graph ID. |
| `file_types` | string | No | Comma-separated list of file extensions to include, e.g. 'pdf,docx,jpg'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Knowledge Graphs

**Slug:** `WRITER_LIST_GRAPHS`

Tool to retrieve a list of knowledge graphs. Use when you need an overview of existing graphs.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Models

**Slug:** `WRITER_LIST_MODELS`

Tool to list all available language models. Use when you need to discover which models can be used for completions.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Medical Text Comprehension

**Slug:** `WRITER_MEDICAL_COMPREHEND`

Tool to extract medical entities and concepts from unstructured clinical text. Use when you need to label medical text with standardized codes such as SNOMED CT.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | Yes | The clinical or medical text to analyze (max 20,000 characters). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Parse PDF

**Slug:** `WRITER_PARSE_PDF`

Tool to parse and extract text content from a previously uploaded PDF file. Use when you need to convert PDF documents to text or markdown format for further processing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `format` | string ("text" | "markdown") | Yes | Output format for the parsed PDF content: 'text' for plain text or 'markdown' for markdown-formatted output. |
| `file_id` | string | Yes | The ID of the PDF file to parse. Obtained from a prior file upload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove File From Graph

**Slug:** `WRITER_REMOVE_FILE_FROM_GRAPH`

Tool to remove a file from a Knowledge Graph. Use when you need to unlink a specific file from a graph by providing both graph and file identifiers.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The ID of the file to remove from the graph. |
| `graph_id` | string | Yes | The ID of the graph from which to remove the file. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve Knowledge Graph

**Slug:** `WRITER_RETRIEVE_GRAPH`

Tool to retrieve a knowledge graph by its ID. Use when you need details of an existing graph.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `graph_id` | string | Yes | Unique identifier of the knowledge graph to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Text Generation

**Slug:** `WRITER_TEXT_GENERATION`

Tool to generate text based on a given prompt. Use when you need model-driven completions after crafting a prompt.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `stop` | array | No | Sequences where the API will stop generating. |
| `model` | string | Yes | The name of the model to use for generation. Available models include: palmyra-x-003-instruct, palmyra-x4, palmyra-x5, palmyra-creative, palmyra-fin, palmyra-med, palmyra-vision. |
| `top_p` | number | No | Nucleus sampling parameter between 0 and 1. |
| `prompt` | string | Yes | The text prompt for the model. |
| `max_tokens` | integer | No | Maximum number of tokens in the generated output. |
| `temperature` | number | No | Sampling temperature between 0 and 2. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Translate Text

**Slug:** `WRITER_TRANSLATE_TEXT`

Tool to translate text from one language to another with support for formality, length control, and profanity masking. Use when you need to convert text between different languages.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | Yes | The text to translate (maximum 100,000 words) |
| `model` | string ("palmyra-translate") | Yes | Translation model to use |
| `formality` | boolean | Yes | Apply formal language style to the translation (support varies by language) |
| `length_control` | boolean | Yes | Control the length of the output translation (support varies by language) |
| `mask_profanity` | boolean | Yes | Mask profane words in the translated text (support varies by language) |
| `source_language_code` | string | Yes | Source language ISO-639-1 code (e.g., en for English, es for Spanish, fr for French) |
| `target_language_code` | string | Yes | Target language ISO-639-1 code (e.g., en for English, es for Spanish, fr for French) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Knowledge Graph

**Slug:** `WRITER_UPDATE_GRAPH`

Tool to update an existing knowledge graph. Use after confirming the graph_id. Specify at least one of name or description to modify.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | New name for the graph |
| `graph_id` | string | Yes | The unique identifier of the graph to update |
| `description` | string | No | New description for the graph |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload File

**Slug:** `WRITER_UPLOAD_FILE`

Tool to upload a file to Writer. Use when you need to add files for Knowledge Graphs, PDF parsing, or other file-based operations. Files can be associated with Knowledge Graphs for RAG applications.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | The file to upload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Web Search

**Slug:** `WRITER_WEB_SEARCH`

Tool to perform a web search. Use when you need relevant web page results for a given query.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | Yes | The search query string |
| `topic` | string ("general" | "news") | No | Search category: 'general' (default) for broader web search, 'news' for current events and news articles |
| `time_range` | string ("day" | "week" | "month" | "year" | "d" | "w" | "m" | "y") | No | Content recency filter: 'day'/'d', 'week'/'w', 'month'/'m', or 'year'/'y' |
| `max_results` | integer | No | Maximum number of results to return (cannot exceed 20) |
| `search_depth` | string ("basic" | "advanced") | No | Search depth: 'basic' (default, fewer results) or 'advanced' (deeper search) |
| `include_answer` | boolean | No | Include a generated answer based on results (default: true) |
| `exclude_domains` | array | No | Exclude specific domains from results |
| `include_domains` | array | No | Restrict results to specific domains |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
