Skip to content

Commit c7bdd19

Browse files
release: 2.3.3-rc.1 (#237)
* chore(internal): remove .eslintcache * chore(jsdoc): fix @link annotations to refer only to parts of the package‘s public interface * chore(internal): use npm pack for build uploads * chore: extract some types in mcp docs * fix(client): incorrect offset pagination check * fix(mcpb): pin @anthropic-ai/mcpb version * chore(internal): grammar fix (it's -> its) * chore: use structured error when code execution tool errors * chore: mcp code tool explicit error message when missing a run function * feat(mcp): enable optional code execution tool on http mcp servers * chore(mcp): add friendlier MCP code tool errors on incorrect method invocations * chore(mcp): add line numbers to code tool errors * docs(mcp): add a README button for one-click add to Cursor * chore(internal): codegen related update * docs(mcp): add a README link to add server to VS Code or Claude Code * chore(internal): codegen related update * chore(mcp): clarify http auth error * feat(api): Improve MCP tool descriptions * fix(mcp): use raw responses for binary content * fix(mcp): return tool execution error on jq failure * chore(mcp): upgrade jq-web * feat(mcp): add detail field to docs search tool * docs(api): updates to API spec * chore(client): fix logger property type * fix: Fix linting errors. (#238) * release: 2.3.3-rc.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Sarah Deaton <sarah.deaton@writer.com>
1 parent 1d33517 commit c7bdd19

61 files changed

Lines changed: 781 additions & 224 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintcache

Lines changed: 0 additions & 1 deletion
This file was deleted.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.3.2"
2+
".": "2.3.3-rc.1"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 33
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-4ec783072dd7f57c6e021a746df7650fb8d7a164d8ec25c7d5cab06c33bc114f.yml
3-
openapi_spec_hash: ceab065d515f3681b0c33137da308968
4-
config_hash: 089fd5502b9cf91247887b19117f1ca2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-ea6ec4b34f6b7fdecc564f59b2e31482eee05830bf8dc1f389461b158de1548e.yml
3+
openapi_spec_hash: ea89c1faed473908be2740efe6da255f
4+
config_hash: 886645f89dc98f04b8931eaf02854e5f

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# Changelog
22

3+
## 2.3.3-rc.1 (2025-12-01)
4+
5+
Full Changelog: [v2.3.2...v2.3.3-rc.1](https://github.com/writer/writer-node/compare/v2.3.2...v2.3.3-rc.1)
6+
7+
### Features
8+
9+
* **api:** Improve MCP tool descriptions ([95aa714](https://github.com/writer/writer-node/commit/95aa71460549717420896fd47fcebbd603739743))
10+
* **mcp:** add detail field to docs search tool ([0c975f7](https://github.com/writer/writer-node/commit/0c975f793c10f8f047c477ecde35f8e358b95e91))
11+
* **mcp:** enable optional code execution tool on http mcp servers ([cad37b7](https://github.com/writer/writer-node/commit/cad37b70c93d26bdafdfdf6047e9591a1b27376e))
12+
13+
14+
### Bug Fixes
15+
16+
* **client:** incorrect offset pagination check ([b7847ab](https://github.com/writer/writer-node/commit/b7847abd4a65c07090855fd674c6bd4ff15b9760))
17+
* Fix linting errors. ([#238](https://github.com/writer/writer-node/issues/238)) ([12f49e6](https://github.com/writer/writer-node/commit/12f49e62a666d57a934537bf8f25cef1338b3e27))
18+
* **mcpb:** pin @anthropic-ai/mcpb version ([43acbce](https://github.com/writer/writer-node/commit/43acbcefa5cdbabe670ef4a5687ef871a3acf9f6))
19+
* **mcp:** return tool execution error on jq failure ([f833b8f](https://github.com/writer/writer-node/commit/f833b8ffb35c9921f66939cafab7ddc1a6948096))
20+
* **mcp:** use raw responses for binary content ([54da4f9](https://github.com/writer/writer-node/commit/54da4f964cae97a224763a29e851c4c63273953e))
21+
22+
23+
### Chores
24+
25+
* **client:** fix logger property type ([20209b8](https://github.com/writer/writer-node/commit/20209b8c6037de89117b4f9b0e690721380e2dbc))
26+
* extract some types in mcp docs ([de1e150](https://github.com/writer/writer-node/commit/de1e15096bb097df00cdee211b752487d364d977))
27+
* **internal:** codegen related update ([35b1a8f](https://github.com/writer/writer-node/commit/35b1a8fd3128b36cb3a99025547b3484e57ae318))
28+
* **internal:** codegen related update ([5e30270](https://github.com/writer/writer-node/commit/5e3027034d15d23909742ac7a65d5e1db6709631))
29+
* **internal:** grammar fix (it's -&gt; its) ([7dfbe17](https://github.com/writer/writer-node/commit/7dfbe171aa29752dd3e42e15d045fde008d6e96c))
30+
* **internal:** remove .eslintcache ([f75e301](https://github.com/writer/writer-node/commit/f75e3010fb346dde47038f0e876549bc6eba301f))
31+
* **internal:** use npm pack for build uploads ([38c37a1](https://github.com/writer/writer-node/commit/38c37a1cfc2af919b9833344716ff5172a5076b3))
32+
* **jsdoc:** fix [@link](https://github.com/link) annotations to refer only to parts of the package‘s public interface ([d227de6](https://github.com/writer/writer-node/commit/d227de61034910da49481c6ff488436fcfed61fd))
33+
* mcp code tool explicit error message when missing a run function ([16c1a44](https://github.com/writer/writer-node/commit/16c1a446e5f1cf853582afe76bbc21739855ca70))
34+
* **mcp:** add friendlier MCP code tool errors on incorrect method invocations ([e6a4a0c](https://github.com/writer/writer-node/commit/e6a4a0c0936a215c9aed87365108b3bcf59303fd))
35+
* **mcp:** add line numbers to code tool errors ([00af445](https://github.com/writer/writer-node/commit/00af445b63b9a0db2fb59202f7ed3c4d34887990))
36+
* **mcp:** clarify http auth error ([bd123e0](https://github.com/writer/writer-node/commit/bd123e075e8bd0b179f95d8f8513a53414f86ac6))
37+
* **mcp:** upgrade jq-web ([9a0ac58](https://github.com/writer/writer-node/commit/9a0ac581162b2c59792d493e17cbe9d9cb0b5f60))
38+
* use structured error when code execution tool errors ([e140047](https://github.com/writer/writer-node/commit/e140047e470588b4c18bccbdb752078f198d8374))
39+
40+
41+
### Documentation
42+
43+
* **api:** updates to API spec ([69b36c9](https://github.com/writer/writer-node/commit/69b36c97a708452f05522c9b81f0855fea0daadb))
44+
* **mcp:** add a README button for one-click add to Cursor ([062b7d7](https://github.com/writer/writer-node/commit/062b7d73c91530ea083872b67036a77265db9a8d))
45+
* **mcp:** add a README link to add server to VS Code or Claude Code ([bb1991a](https://github.com/writer/writer-node/commit/bb1991af52bb810f9b69ec7d9d761d8b79aa6b15))
46+
347
## 2.3.2 (2025-10-03)
448

549
Full Changelog: [v2.3.2-rc.2...v2.3.2](https://github.com/writer/writer-node/compare/v2.3.2-rc.2...v2.3.2)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "writer-sdk",
3-
"version": "2.3.2",
3+
"version": "2.3.3-rc.1",
44
"description": "The official TypeScript library for the Writer API",
55
"author": "Writer <dev-feedback@writer.com>",
66
"types": "dist/index.d.ts",

packages/mcp-server/README.md

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,36 @@ For clients with a configuration JSON, it might look something like this:
3434
}
3535
```
3636

37+
### Cursor
38+
39+
If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
40+
in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server.
41+
42+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=writer-sdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIndyaXRlci1zZGstbWNwIl0sImVudiI6eyJXUklURVJfQVBJX0tFWSI6IlNldCB5b3VyIFdSSVRFUl9BUElfS0VZIGhlcmUuIn19)
43+
44+
### VS Code
45+
46+
If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables
47+
in VS Code's `mcp.json`, which can be found via Command Palette > MCP: Open User Configuration.
48+
49+
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22writer-sdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22writer-sdk-mcp%22%5D%2C%22env%22%3A%7B%22WRITER_API_KEY%22%3A%22Set%20your%20WRITER_API_KEY%20here.%22%7D%7D)
50+
51+
### Claude Code
52+
53+
If you use Claude Code, you can install the MCP server by running the command below in your terminal. You will need to set your
54+
environment variables in Claude Code's `.claude.json`, which can be found in your home directory.
55+
56+
```
57+
claude mcp add --transport stdio writer_sdk_api --env WRITER_API_KEY="Your WRITER_API_KEY here." -- npx -y writer-sdk-mcp
58+
```
59+
3760
## Exposing endpoints to your MCP Client
3861

39-
There are two ways to expose endpoints as tools in the MCP server:
62+
There are three ways to expose endpoints as tools in the MCP server:
4063

4164
1. Exposing one tool per endpoint, and filtering as necessary
4265
2. Exposing a set of tools to dynamically discover and invoke endpoints from the API
66+
3. Exposing a docs search tool and a code execution tool, allowing the client to write code to be executed against the TypeScript client
4367

4468
### Filtering endpoints and tools
4569

@@ -74,6 +98,18 @@ All of these command-line options can be repeated, combined together, and have c
7498

7599
Use `--list` to see the list of available tools, or see below.
76100

101+
### Code execution
102+
103+
If you specify `--tools=code` to the MCP server, it will expose just two tools:
104+
105+
- `search_docs` - Searches the API documentation and returns a list of markdown results
106+
- `execute` - Runs code against the TypeScript client
107+
108+
This allows the LLM to implement more complex logic by chaining together many API calls without loading
109+
intermediary results into its context window.
110+
111+
The code execution itself happens in a Deno sandbox that has network access only to the base URL for the API.
112+
77113
### Specifying the MCP Client
78114

79115
Different clients have varying abilities to handle arbitrary tools and schemas.
@@ -207,8 +243,8 @@ The following tools are available in this MCP server.
207243
### Resource `applications`:
208244

209245
- `retrieve_applications` (`read`): Retrieves detailed information for a specific no-code agent (formerly called no-code applications), including its configuration and current status.
210-
- `list_applications` (`read`): Retrieves a paginated list of no-code agents (formerly called no-code applications) with optional filtering and sorting capabilities.
211-
- `generate_content_applications` (`write`): Generate content from an existing no-code agent (formerly called no-code applications) with inputs.
246+
- `list_applications` (`read`): Get all available no-code agents (applications) in your account. No-code agents are pre-configured AI workflows built in Writer's AI Studio. Use this to discover which agents are available before generating content from them.
247+
- `generate_content_applications` (`write`): Generate content using a pre-configured no-code agent. No-code agents are custom AI workflows you've built in AI Studio with specific prompts, models, and settings. Provide the application ID and required inputs to get tailored content. Useful for consistent, repeatable AI tasks like content generation, data extraction, or custom workflows.
212248

213249
### Resource `applications.jobs`:
214250

@@ -224,35 +260,35 @@ The following tools are available in this MCP server.
224260

225261
### Resource `chat`:
226262

227-
- `chat_chat` (`write`): Generate a chat completion based on the provided messages. The response shown below is for non-streaming. To learn about streaming responses, see the [chat completion guide](https://dev.writer.com/home/chat-completion).
263+
- `chat_chat` (`write`): Generate AI responses for conversational interactions. Use this for chat-based tasks, Q&A, content generation, and any natural language processing. Supports tools like Knowledge Graphs, web search, translation, and vision. Choose from models like palmyra-x5, palmyra-x4, palmyra-creative, palmyra-med, or palmyra-fin depending on the task.
228264

229265
### Resource `completions`:
230266

231-
- `create_completions` (`write`): Generate text completions using the specified model and prompt. This endpoint is useful for text generation tasks that don't require conversational context.
267+
- `create_completions` (`write`): Generate text completions from a single prompt without conversational context. Best for straightforward text generation tasks like article writing, summaries, or creative content. For interactive conversations or multi-turn dialogues, use generate-chat-completion instead.
232268

233269
### Resource `models`:
234270

235271
- `list_models` (`read`): Retrieve a list of available models that can be used for text generation, chat completions, and other AI tasks.
236272

237273
### Resource `graphs`:
238274

239-
- `create_graphs` (`write`): Create a new Knowledge Graph.
240-
- `retrieve_graphs` (`read`): Retrieve a Knowledge Graph.
275+
- `create_graphs` (`write`): Create a new Knowledge Graph to organize and query documents. Knowledge Graphs are containers for files that enable AI-powered search and question answering. After creation, add files to the graph using add-file-to-graph, then query it using query-knowledge-graph.
276+
- `retrieve_graphs` (`read`): Get detailed information about a specific Knowledge Graph by its ID. Returns the graph name, description, creation date, file processing status, and associated URLs (for web-based graphs). Use this to check processing status or get graph metadata.
241277
- `update_graphs` (`write`): Update the name and description of a Knowledge Graph.
242-
- `list_graphs` (`read`): Retrieve a list of Knowledge Graphs.
278+
- `list_graphs` (`read`): Get all available Knowledge Graphs in your account. Knowledge Graphs are collections of documents and files that can be queried using AI. Use this to discover which knowledge bases are available before querying them.
243279
- `delete_graphs` (`write`): Delete a Knowledge Graph.
244-
- `add_file_to_graph_graphs` (`write`): Add a file to a Knowledge Graph.
245-
- `question_graphs` (`write`): Ask a question to specified Knowledge Graphs.
280+
- `add_file_to_graph_graphs` (`write`): Add an uploaded file to a Knowledge Graph to make it queryable. The file must already be uploaded using upload-file. Once added, the file's content becomes searchable when querying the Knowledge Graph. Files are processed asynchronously - check status using get-file-info.
281+
- `question_graphs` (`write`): Ask questions and get AI-generated answers based on your Knowledge Graph content. Queries your uploaded documents, PDFs, and files to retrieve accurate, source-cited information. Returns answers with supporting snippets and file references. Ideal for RAG (Retrieval-Augmented Generation) applications and knowledge base queries.
246282
- `remove_file_from_graph_graphs` (`write`): Remove a file from a Knowledge Graph.
247283

248284
### Resource `files`:
249285

250-
- `retrieve_files` (`read`): Retrieve detailed information about a specific file, including its metadata, status, and associated graphs.
251-
- `list_files` (`read`): Retrieve a paginated list of files with optional filtering by status, graph association, and file type.
286+
- `retrieve_files` (`read`): Get metadata and status information for a specific file by its ID. Returns file name, creation date, processing status, and associated Knowledge Graph IDs. Use this to check if a file has finished processing or to find which Knowledge Graphs contain a specific file.
287+
- `list_files` (`read`): Get a paginated list of all uploaded files. Filter by processing status (in_progress, completed, failed), Knowledge Graph association, or file type. Use this to discover available files, monitor processing status, or find files to add to Knowledge Graphs.
252288
- `delete_files` (`write`): Permanently delete a file from the system. This action cannot be undone.
253289
- `download_files` (`read`): Download the binary content of a file. The response will contain the file data in the appropriate MIME type.
254290
- `retry_files` (`write`): Retry processing of files that previously failed to process. This will re-attempt the processing of the specified files.
255-
- `upload_files` (`write`): Upload a new file to the system. Supports various file formats including PDF, DOC, DOCX, PPT, PPTX, JPG, PNG, EML, HTML, SRT, CSV, XLS, and XLSX.
291+
- `upload_files` (`write`): Upload documents and files to Writer. Supports PDF, DOC, DOCX, PPT, PPTX, JPG, PNG, EML, HTML, SRT, CSV, XLS, XLSX, MP3, and MP4 formats. Once uploaded, files can be added to Knowledge Graphs for querying or used with Vision API for image analysis. Returns a file ID for subsequent operations.
256292

257293
### Resource `tools`:
258294

@@ -271,4 +307,4 @@ The following tools are available in this MCP server.
271307

272308
### Resource `vision`:
273309

274-
- `analyze_vision` (`write`): Submit images and a prompt to generate an analysis of the images.
310+
- `analyze_vision` (`write`): Submit images and documents with a prompt to generate an analysis. Supports JPG, PNG, PDF, and TXT files up to 7MB each.

packages/mcp-server/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "writer-sdk-mcp",
3-
"version": "2.3.2",
3+
"version": "2.3.3-rc.1",
44
"description": "The official MCP Server for the Writer API",
55
"author": "Writer <dev-feedback@writer.com>",
66
"types": "dist/index.d.ts",
@@ -36,8 +36,10 @@
3636
"@valtown/deno-http-worker": "^0.0.21",
3737
"cors": "^2.8.5",
3838
"express": "^5.1.0",
39-
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz",
39+
"fuse.js": "^7.1.0",
40+
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz",
4041
"qs": "^6.14.0",
42+
"typescript": "5.8.3",
4143
"yargs": "^17.7.2",
4244
"zod": "^3.25.20",
4345
"zod-to-json-schema": "^3.24.5",
@@ -47,7 +49,7 @@
4749
"mcp-server": "dist/index.js"
4850
},
4951
"devDependencies": {
50-
"@anthropic-ai/mcpb": "^1.1.0",
52+
"@anthropic-ai/mcpb": "1.1.0",
5153
"@types/cors": "^2.8.19",
5254
"@types/express": "^5.0.3",
5355
"@types/jest": "^29.4.0",
@@ -64,8 +66,7 @@
6466
"ts-morph": "^19.0.0",
6567
"ts-node": "^10.5.0",
6668
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
67-
"tsconfig-paths": "^4.0.0",
68-
"typescript": "5.8.3"
69+
"tsconfig-paths": "^4.0.0"
6970
},
7071
"imports": {
7172
"writer-sdk-mcp": ".",

0 commit comments

Comments
 (0)