# Writer (AI Enterprise LLM) MCP

> Writer (AI Enterprise LLM) connects your AI agent to full-stack enterprise models and Knowledge Graphs. Use it to process internal documents, answer complex questions based on proprietary data, or generate high-quality content using custom trained models.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** llm, enterprise-ai, knowledge-graph, rag, palmyra

## Description

Need to generate content from private company data? This MCP lets your agent access Writer’s powerful LLMs, enabling you to build sophisticated applications directly on your enterprise knowledge. Instead of just generating text, the system manages complex Knowledge Graphs and processes internal documents, allowing it to answer questions using facts pulled only from your own source material. You can upload files, analyze images inside those files, or even run scheduled tasks through no-code application generators. When you connect this MCP via Vinkius, credentials pass through a zero-trust proxy; that means your sensitive keys are used only in transit and never stored on disk, keeping your data secure while letting your AI agent work across private enterprise resources.

## Tools

### add_file_to_graph
Adds an uploaded file to a Knowledge Graph for context and analysis.

### analyze_vision
Uses prompts to analyze the contents of images or documents you provide.

### ask_question
Queries one or more Knowledge Graphs directly with a question, retrieving answers from the contained data.

### chat_completion
Generates conversational chat text completions using Writer's enterprise models.

### create_graph
Builds a brand new, empty Knowledge Graph structure for your specific project or topic.

### delete_file
Removes a specified file permanently from the system and context.

### download_file
Downloads the raw binary content of any listed file.

### generate_application_content_async
Starts a complex content generation job that runs in the background, providing a job ID for later checking.

### generate_application_content
Creates content synchronously by running a no-code application workflow.

### get_application_job
Checks the current status and result of an asynchronous content generation job.

### get_application
Retrieves configuration details and required inputs for a specific pre-built application workflow.

### get_file
Fetches metadata (like size or owner) for a specific uploaded file ID.

### list_application_jobs
Retrieves a list of all job executions for a given application workflow.

### list_applications
Shows a directory of all deployed, no-code agent applications available in the system.

### list_files
Retrieves a paginated list of every file that has been uploaded to the platform.

### list_graphs
Lists all existing Knowledge Graphs, allowing you to see what data sources are available.

### list_models
Provides a list of the specific Writer models currently accessible for generation tasks.

### parse_pdf
Converts PDF documents into plain text or Markdown format (Note: This tool is deprecated).

### remove_file_from_graph
Deletes a specific file's connection to a Knowledge Graph without deleting the original file.

### retry_application_job
Attempts to re-run an application job that previously failed.

### text_completion
Generates simple text completions for a single, straightforward prompt.

### translate_text
Converts written text from one supported language into another.

### upload_file
Uploads a file to the platform, making it available for graph building or vision analysis.

### web_search
Performs a search query against the live web for current information.

## Prompt Examples

**Prompt:** 
```
List all available Writer models.
```

**Response:** 
```
I've retrieved the models. You have access to palmyra-x5, palmyra-x5-32k, and palmyra-med. Which one would you like to use for your task?
```

**Prompt:** 
```
Create a new Knowledge Graph named 'Q4 Strategy'.
```

**Response:** 
```
I have successfully created the 'Q4 Strategy' Knowledge Graph. You can now use `add_file_to_graph` to include documents for RAG analysis.
```

**Prompt:** 
```
Upload 'report.pdf' and list all my files.
```

**Response:** 
```
File 'report.pdf' has been uploaded successfully. Your current file list includes: 'report.pdf' (ID: file-123) and 'budget.xlsx' (ID: file-456).
```

## Capabilities

### Build Knowledge Bases
Create dedicated knowledge graphs and add files to them so the LLM can answer questions using only that specific set of internal documents.

### Analyze Proprietary Data
Upload various file types, like PDFs or images, and have the system analyze their content using prompts before generating a response or writing new material.

### Generate Content & Chat
Use high-performance models to generate long-form text completions or handle conversational chat tasks based on specific inputs.

### Manage Digital Assets
List, upload, download, and permanently delete files needed for training graphs or providing context to the AI agent.

### Run Applications & Workflows
Execute complex, multi-step content generation tasks asynchronously, retrieving job status when finished.

## Use Cases

### Retrieving Policy Details
A compliance officer needs to know the current PTO policy for remote workers. Instead of searching through fifty HR PDFs, they ask their agent a question. The agent uses `ask_question` against the 'HR Manual' Knowledge Graph and provides a direct quote from the correct document.

### Analyzing Competitor Reports
A market analyst uploads three competitor annual reports using `upload_file`. They then use `analyze_vision` on the charts within those PDFs, followed by asking the agent to summarize key risks across all documents.

### Building a Training Module
A technical writer needs content based on product specs. They first list available models using `list_models`, then use `text_completion` for drafts, and finally run the entire sequence through an application job started by `generate_application_content_async`.

### Cleaning Up Data Context
A data engineer realizes a retired project document is polluting a graph. They use `list_graphs` to identify the wrong knowledge base, then call `remove_file_from_graph` on the specific file ID to clean up the context.

## Benefits

- Build reliable, fact-checked answers. By using `add_file_to_graph` and then calling `ask_question`, you guarantee the AI agent bases its response on your specific internal files, not general web knowledge.
- Handle complex document pipelines efficiently. Uploading documents via `upload_file` lets you gather context for both Knowledge Graph building and immediate analysis using `analyze_vision`.
- Automate multi-stage content creation. If a task requires multiple steps—like fetching data, processing it, then writing a report—you can queue the process with `generate_application_content_async`, getting notified when it’s done via `get_application_job`.
- Maintain security while scaling up. Since Vinkius handles all MCP execution inside its own sandbox and uses a zero-trust proxy, you know your API keys are secure in transit, no matter how many tools you chain together.
- Improve cost management across the board. Every tool call benefits from Vinkius's native token optimization, which cuts down on unnecessary costs compared to running these same operations without it.

## How It Works

The bottom line is that it lets your AI client treat private enterprise documents and complex relationships as first-class data sources for generation.

1. Subscribe to this MCP and enter your Writer API key.
2. The AI agent can then use tools like `create_graph` or `upload_file` to ingest your data into the system.
3. Finally, you instruct the agent to use a tool like `ask_question` to query the newly built knowledge graph for an answer.

## Frequently Asked Questions

**How do I make sure my LLM only uses my internal documents? (Tool: ask_question)**
You must first build a Knowledge Graph by uploading files and using `add_file_to_graph`. The `ask_question` tool is designed to query *only* that specific graph, ignoring external web knowledge.

**Can I run a multi-step process automatically? (Tool: generate_application_content_async)**
Yes. Use `generate_application_content_async` to kick off workflows. This is necessary for tasks that require multiple steps, like first analyzing an image with `analyze_vision`, then writing text based on the result.

**I uploaded a PDF; how do I make sure it's available? (Tool: list_files)**
Use `list_files` to get a paginated inventory of every file ID and name. This confirms the upload succeeded before you try to add it to a graph or analyze it.

**What's the difference between chat_completion and text_completion? (Tool: chat_completion)**
Use `chat_completion` for conversational interactions, where the history of the conversation matters. Use `text_completion` when you just need a single block of generated text based on one prompt.

**How do I delete old files from my knowledge base? (Tool: remove_file_from_graph)**
Don't just delete the file; use `remove_file_from_graph`. This tool cleanly severs the connection to the graph, keeping your data clean while preserving the original document.

**If I need to permanently remove a file, what are the steps involved when using `delete_file`?**
The file is immediately and irrevocably deleted from your system. This action removes both the binary content and all associated metadata records for that file within your connected knowledge graph.

**How do I check which LLM models are available before running a chat completion? Should I use `list_models`?**
Yes, you must call `list_models` to see all writer-supported versions. This ensures your agent uses the optimal model—like Palmyra-X5 or a specific size—for the job at hand.

**If I have an image or document that isn't text, how do I process it for context using `analyze_vision`?**
You simply pass the visual file directly to `analyze_vision`. The service interprets the images and documents, generating a structured, descriptive text output your agent can then use for content generation.

**How do I see which Palmyra models are available in my account?**
Use the `list_models` tool. It will return a list of all active models in your Writer account, such as palmyra-x5 or palmyra-med.

**Can I use my own documents for AI responses?**
Yes. First, use `upload_file` to add your documents, then `create_graph` and `add_file_to_graph` to build a Knowledge Graph for RAG-based querying.

**Does this support conversational history?**
Yes, the `chat_completion` tool accepts a `messages` array, allowing you to maintain full context for multi-turn dialogues with the model.