Skip to content

Commit fed9ed4

Browse files
Merge pull request #19 from CASParser/release-please--branches--main--changes--next--components--cas-parser-node
release: 1.10.1
2 parents f346e30 + 9374f99 commit fed9ed4

File tree

13 files changed

+64
-36
lines changed

13 files changed

+64
-36
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,28 @@ jobs:
6565
run: ./scripts/build
6666

6767
- name: Get GitHub OIDC Token
68-
if: github.repository == 'stainless-sdks/cas-parser-typescript'
68+
if: |-
69+
github.repository == 'stainless-sdks/cas-parser-typescript' &&
70+
!startsWith(github.ref, 'refs/heads/stl/')
6971
id: github-oidc
7072
uses: actions/github-script@v8
7173
with:
7274
script: core.setOutput('github_token', await core.getIDToken());
7375

7476
- name: Upload tarball
75-
if: github.repository == 'stainless-sdks/cas-parser-typescript'
77+
if: |-
78+
github.repository == 'stainless-sdks/cas-parser-typescript' &&
79+
!startsWith(github.ref, 'refs/heads/stl/')
7680
env:
7781
URL: https://pkg.stainless.com/s
7882
AUTH: ${{ steps.github-oidc.outputs.github_token }}
7983
SHA: ${{ github.sha }}
8084
run: ./scripts/utils/upload-artifact.sh
8185

8286
- name: Upload MCP Server tarball
83-
if: github.repository == 'stainless-sdks/cas-parser-typescript'
87+
if: |-
88+
github.repository == 'stainless-sdks/cas-parser-typescript' &&
89+
!startsWith(github.ref, 'refs/heads/stl/')
8490
env:
8591
URL: https://pkg.stainless.com/s?subpackage=mcp-server
8692
AUTH: ${{ steps.github-oidc.outputs.github_token }}

.release-please-manifest.json

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

CHANGELOG.md

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

3+
## 1.10.1 (2026-03-07)
4+
5+
Full Changelog: [v1.10.0...v1.10.1](https://github.com/CASParser/cas-parser-node/compare/v1.10.0...v1.10.1)
6+
7+
### Bug Fixes
8+
9+
* **client:** preserve URL params already embedded in path ([4463ff7](https://github.com/CASParser/cas-parser-node/commit/4463ff7c902ccf318892d2b1ce7976b9d0dca5a1))
10+
11+
12+
### Chores
13+
14+
* **ci:** skip uploading artifacts on stainless-internal branches ([884f203](https://github.com/CASParser/cas-parser-node/commit/884f20313d10951ef4413f6b3a258025cc2ee2b3))
15+
* **internal:** codegen related update ([9add47e](https://github.com/CASParser/cas-parser-node/commit/9add47ed236c49b558a6498e12908a4a6ea45da2))
16+
* **internal:** codegen related update ([ccf33c8](https://github.com/CASParser/cas-parser-node/commit/ccf33c894ed6ff3f9ec9728ca3b6304893b05269))
17+
* **internal:** use x-stainless-mcp-client-envs header for MCP remote code tool calls ([9ddb632](https://github.com/CASParser/cas-parser-node/commit/9ddb632b1c81bbbc71aa368509b26b95f35a32e9))
18+
* **mcp-server:** improve instructions ([30dda75](https://github.com/CASParser/cas-parser-node/commit/30dda75bbcbef7632d04ba868e455370704a3c61))
19+
* **mcp-server:** return access instructions for 404 without API key ([fdb885a](https://github.com/CASParser/cas-parser-node/commit/fdb885a459f35993fa0b4b07f079a8167cadbe9b))
20+
321
## 1.10.0 (2026-03-03)
422

523
Full Changelog: [v1.9.0...v1.10.0](https://github.com/CASParser/cas-parser-node/compare/v1.9.0...v1.10.0)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cas-parser-node",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"description": "The official TypeScript library for the Cas Parser API",
55
"author": "Cas Parser <sameer@casparser.in>",
66
"types": "dist/index.d.ts",

packages/mcp-server/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dxt_version": "0.2",
33
"name": "cas-parser-node-mcp",
4-
"version": "1.10.0",
4+
"version": "1.10.1",
55
"description": "The official MCP Server for the Cas Parser API",
66
"author": {
77
"name": "Cas Parser",

packages/mcp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cas-parser-node-mcp",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"description": "The official MCP Server for the Cas Parser API",
55
"author": "Cas Parser <sameer@casparser.in>",
66
"types": "dist/index.d.ts",

packages/mcp-server/src/code-tool.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const remoteStainlessHandler = async ({
155155
headers: {
156156
...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }),
157157
'Content-Type': 'application/json',
158-
client_envs: JSON.stringify({
158+
'x-stainless-mcp-client-envs': JSON.stringify({
159159
CAS_PARSER_API_KEY: requireValue(
160160
readEnv('CAS_PARSER_API_KEY') ?? client.apiKey,
161161
'set CAS_PARSER_API_KEY environment variable or provide apiKey client option',
@@ -172,6 +172,11 @@ const remoteStainlessHandler = async ({
172172
});
173173

174174
if (!res.ok) {
175+
if (res.status === 404 && !reqContext.stainlessApiKey) {
176+
throw new Error(
177+
'Could not access code tool for this project. You may need to provide a Stainless API key via the STAINLESS_API_KEY environment variable, the --stainless-api-key flag, or the x-stainless-api-key HTTP header.',
178+
);
179+
}
175180
throw new Error(
176181
`${res.status}: ${
177182
res.statusText

packages/mcp-server/src/docs-search-tool.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export const metadata: Metadata = {
1313

1414
export const tool: Tool = {
1515
name: 'search_docs',
16-
description: 'Search for documentation for how to use the client to interact with the API.',
16+
description:
17+
'Search SDK documentation to find methods, parameters, and usage examples for interacting with the API. Use this before writing code when you need to discover the right approach.',
1718
inputSchema: {
1819
type: 'object',
1920
properties: {
@@ -73,6 +74,13 @@ export const handler = async ({
7374
},
7475
'Got error response from docs search tool',
7576
);
77+
78+
if (result.status === 404 && !reqContext.stainlessApiKey) {
79+
throw new Error(
80+
'Could not find docs for this project. You may need to provide a Stainless API key via the STAINLESS_API_KEY environment variable, the --stainless-api-key flag, or the x-stainless-api-key HTTP header.',
81+
);
82+
}
83+
7684
throw new Error(
7785
`${result.status}: ${result.statusText} when using doc search tool. Details: ${errorText}`,
7886
);

packages/mcp-server/src/instructions.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,11 @@ async function fetchLatestInstructions(stainlessApiKey: string | undefined): Pro
5555
'Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...',
5656
);
5757

58-
instructions = `
59-
This is the cas-parser MCP server. You will use Code Mode to help the user perform
60-
actions. You can use search_docs tool to learn about how to take action with this server. Then,
61-
you will write TypeScript code using the execute tool take action. It is CRITICAL that you be
62-
thoughtful and deliberate when executing code. Always try to entirely solve the problem in code
63-
block: it can be as long as you need to get the job done!
64-
`;
58+
instructions =
59+
'\n This is the cas-parser MCP server.\n\n Available tools:\n - search_docs: Search SDK documentation to find the right methods and parameters.\n - execute: Run TypeScript code against a pre-authenticated SDK client. Define an async run(client) function.\n\n Workflow:\n - If unsure about the API, call search_docs first.\n - Write complete solutions in a single execute call when possible. For large datasets, use API filters to narrow results or paginate within a single execute block.\n - If execute returns an error, read the error and fix your code rather than retrying the same approach.\n - Variables do not persist between execute calls. Return or log all data you need.\n - Individual HTTP requests to the API have a 30-second timeout. If a request times out, try a smaller query or add filters.\n - Code execution has a total timeout of approximately 5 minutes. If your code times out, simplify it or break it into smaller steps.\n ';
6560
}
6661

6762
instructions ??= ((await response.json()) as { instructions: string }).instructions;
68-
instructions = `
69-
If needed, you can get the current time by executing Date.now().
70-
71-
${instructions}
72-
`;
7363

7464
return instructions;
7565
}

packages/mcp-server/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const newMcpServer = async (stainlessApiKey: string | undefined) =>
2020
new McpServer(
2121
{
2222
name: 'cas_parser_node_api',
23-
version: '1.10.0',
23+
version: '1.10.1',
2424
},
2525
{
2626
instructions: await getInstructions(stainlessApiKey),

0 commit comments

Comments
 (0)