Skip to content

Commit ace6591

Browse files
authored
Merge pull request #64 from isaacus-dev/release-please--branches--main--changes--next--components--isaacus
release: 0.22.0
2 parents 9a3867c + 29e52e8 commit ace6591

25 files changed

Lines changed: 302 additions & 132 deletions

.github/workflows/ci.yml

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

5757
- name: Get GitHub OIDC Token
58-
if: github.repository == 'stainless-sdks/isaacus-typescript'
58+
if: |-
59+
github.repository == 'stainless-sdks/isaacus-typescript' &&
60+
!startsWith(github.ref, 'refs/heads/stl/')
5961
id: github-oidc
6062
uses: actions/github-script@v8
6163
with:
6264
script: core.setOutput('github_token', await core.getIDToken());
6365

6466
- name: Upload tarball
65-
if: github.repository == 'stainless-sdks/isaacus-typescript'
67+
if: |-
68+
github.repository == 'stainless-sdks/isaacus-typescript' &&
69+
!startsWith(github.ref, 'refs/heads/stl/')
6670
env:
6771
URL: https://pkg.stainless.com/s
6872
AUTH: ${{ steps.github-oidc.outputs.github_token }}
6973
SHA: ${{ github.sha }}
7074
run: ./scripts/utils/upload-artifact.sh
7175

7276
- name: Upload MCP Server tarball
73-
if: github.repository == 'stainless-sdks/isaacus-typescript'
77+
if: |-
78+
github.repository == 'stainless-sdks/isaacus-typescript' &&
79+
!startsWith(github.ref, 'refs/heads/stl/')
7480
env:
7581
URL: https://pkg.stainless.com/s?subpackage=mcp-server
7682
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-
".": "0.21.0"
2+
".": "0.22.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-baf5ebdd05d1b5192759a356c2701131c47cfb5b7239a49fcb94e68d4210648c.yml
3-
openapi_spec_hash: 6ea786d56726e18156adf57915fcbe5f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-3fc0da1b03c07a47ee0a04ff61443710b99e6d24e8ba5986aab0b1c023c6f0d5.yml
3+
openapi_spec_hash: 5992dd036e090cc43fa15ea5ff985f77
44
config_hash: 9040e7359f066240ad536041fb2c5185

CHANGELOG.md

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

3+
## 0.22.0 (2026-03-11)
4+
5+
Full Changelog: [v0.21.0...v0.22.0](https://github.com/isaacus-dev/isaacus-typescript/compare/v0.21.0...v0.22.0)
6+
7+
### Features
8+
9+
* **api:** add kanon-2-reranker ([6874725](https://github.com/isaacus-dev/isaacus-typescript/commit/68747257c2b6c34baa76d78e9c889d240189a83b))
10+
* **api:** drop mini models ([f08dc45](https://github.com/isaacus-dev/isaacus-typescript/commit/f08dc4595a60ced58c376960be99d73cfcf1658c))
11+
12+
13+
### Bug Fixes
14+
15+
* **client:** preserve URL params already embedded in path ([2acb447](https://github.com/isaacus-dev/isaacus-typescript/commit/2acb447b0308ed21983f1c8d665016e8bcf802a4))
16+
17+
18+
### Chores
19+
20+
* **ci:** skip uploading artifacts on stainless-internal branches ([ade18ff](https://github.com/isaacus-dev/isaacus-typescript/commit/ade18ffd5cf57d9c38e54665cf418dc54a56fd3c))
21+
* **internal:** codegen related update ([77a4e10](https://github.com/isaacus-dev/isaacus-typescript/commit/77a4e109763c99585dacdc0e5786f8bf214f173e))
22+
* **internal:** codegen related update ([61d1a70](https://github.com/isaacus-dev/isaacus-typescript/commit/61d1a70e6af2ff3c1c0f16517bca200f162cf9c1))
23+
* **internal:** update dependencies to address dependabot vulnerabilities ([625f523](https://github.com/isaacus-dev/isaacus-typescript/commit/625f523f36e1935b253dc3b7258b2f8e5cd866fd))
24+
* **internal:** use x-stainless-mcp-client-envs header for MCP remote code tool calls ([e372066](https://github.com/isaacus-dev/isaacus-typescript/commit/e372066ae02d0ffcf5fae210ba027c9b13950141))
25+
* **mcp-server:** improve instructions ([381ce99](https://github.com/isaacus-dev/isaacus-typescript/commit/381ce99950e4220f5c7ca5f20faabcdc5252ec8a))
26+
* **mcp-server:** return access instructions for 404 without API key ([8d188e6](https://github.com/isaacus-dev/isaacus-typescript/commit/8d188e6a165648c20580f15c5f4ce8febc7acab1))
27+
28+
29+
### Documentation
30+
31+
* **api:** reworded descriptions ([d3924ec](https://github.com/isaacus-dev/isaacus-typescript/commit/d3924ec55f712b7df79847049c7f6e4ea07352a2))
32+
333
## 0.21.0 (2026-03-03)
434

535
Full Changelog: [v0.20.2...v0.21.0](https://github.com/isaacus-dev/isaacus-typescript/compare/v0.20.2...v0.21.0)

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "isaacus",
3-
"version": "0.21.0",
3+
"version": "0.22.0",
44
"description": "The official TypeScript library for the Isaacus API",
55
"author": "Isaacus <support@isaacus.com>",
66
"types": "dist/index.d.ts",
@@ -50,6 +50,17 @@
5050
"typescript": "5.8.3",
5151
"typescript-eslint": "8.31.1"
5252
},
53+
"overrides": {
54+
"minimatch": "^9.0.5"
55+
},
56+
"pnpm": {
57+
"overrides": {
58+
"minimatch": "^9.0.5"
59+
}
60+
},
61+
"resolutions": {
62+
"minimatch": "^9.0.5"
63+
},
5364
"exports": {
5465
".": {
5566
"import": "./dist/index.mjs",

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": "isaacus-mcp",
4-
"version": "0.21.0",
4+
"version": "0.22.0",
55
"description": "The official MCP Server for the Isaacus API",
66
"author": {
77
"name": "Isaacus",

packages/mcp-server/package.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "isaacus-mcp",
3-
"version": "0.21.0",
3+
"version": "0.22.0",
44
"description": "The official MCP Server for the Isaacus API",
55
"author": "Isaacus <support@isaacus.com>",
66
"types": "dist/index.d.ts",
@@ -26,21 +26,25 @@
2626
"format": "prettier --write --cache --cache-strategy metadata . !dist",
2727
"prepare": "npm run build",
2828
"tsn": "ts-node -r tsconfig-paths/register",
29-
"lint": "eslint --ext ts,js .",
30-
"fix": "eslint --fix --ext ts,js ."
29+
"lint": "eslint .",
30+
"fix": "eslint --fix ."
3131
},
3232
"dependencies": {
3333
"isaacus": "file:../../dist/",
34+
"ajv": "^8.18.0",
3435
"@cloudflare/cabidela": "^0.2.4",
35-
"@modelcontextprotocol/sdk": "^1.26.0",
36+
"@hono/node-server": "^1.19.10",
37+
"@modelcontextprotocol/sdk": "^1.27.1",
38+
"hono": "^4.12.4",
3639
"@valtown/deno-http-worker": "^0.0.21",
3740
"cookie-parser": "^1.4.6",
3841
"cors": "^2.8.5",
3942
"express": "^5.1.0",
4043
"fuse.js": "^7.1.0",
4144
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz",
42-
"morgan": "^1.10.0",
43-
"morgan-body": "^2.6.9",
45+
"pino": "^10.3.1",
46+
"pino-http": "^11.0.0",
47+
"pino-pretty": "^13.1.3",
4448
"qs": "^6.14.1",
4549
"typescript": "5.8.3",
4650
"yargs": "^17.7.2",
@@ -57,14 +61,13 @@
5761
"@types/cors": "^2.8.19",
5862
"@types/express": "^5.0.3",
5963
"@types/jest": "^29.4.0",
60-
"@types/morgan": "^1.9.10",
6164
"@types/qs": "^6.14.0",
6265
"@types/yargs": "^17.0.8",
6366
"@typescript-eslint/eslint-plugin": "8.31.1",
6467
"@typescript-eslint/parser": "8.31.1",
65-
"eslint": "^8.49.0",
66-
"eslint-plugin-prettier": "^5.0.1",
67-
"eslint-plugin-unused-imports": "^3.0.0",
68+
"eslint": "^9.39.1",
69+
"eslint-plugin-prettier": "^5.4.1",
70+
"eslint-plugin-unused-imports": "^4.1.4",
6871
"jest": "^29.4.0",
6972
"prettier": "^3.0.0",
7073
"ts-jest": "^29.1.0",

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

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
import { Tool } from '@modelcontextprotocol/sdk/types.js';
1818
import { readEnv, requireValue } from './util';
1919
import { WorkerInput, WorkerOutput } from './code-tool-types';
20+
import { getLogger } from './logger';
2021
import { SdkMethod } from './methods';
2122
import { McpCodeExecutionMode } from './options';
2223
import { ClientOptions } from 'isaacus';
@@ -87,6 +88,8 @@ export function codeTool({
8788
},
8889
};
8990

91+
const logger = getLogger();
92+
9093
const handler = async ({
9194
reqContext,
9295
args,
@@ -111,11 +114,27 @@ export function codeTool({
111114
}
112115
}
113116

117+
let result: ToolCallResult;
118+
const startTime = Date.now();
119+
114120
if (codeExecutionMode === 'local') {
115-
return await localDenoHandler({ reqContext, args });
121+
logger.debug('Executing code in local Deno environment');
122+
result = await localDenoHandler({ reqContext, args });
116123
} else {
117-
return await remoteStainlessHandler({ reqContext, args });
124+
logger.debug('Executing code in remote Stainless environment');
125+
result = await remoteStainlessHandler({ reqContext, args });
118126
}
127+
128+
logger.info(
129+
{
130+
codeExecutionMode,
131+
durationMs: Date.now() - startTime,
132+
isError: result.isError,
133+
contentRows: result.content?.length ?? 0,
134+
},
135+
'Got code tool execution result',
136+
);
137+
return result;
119138
};
120139

121140
return { metadata, tool, handler };
@@ -140,7 +159,7 @@ const remoteStainlessHandler = async ({
140159
headers: {
141160
...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }),
142161
'Content-Type': 'application/json',
143-
client_envs: JSON.stringify({
162+
'x-stainless-mcp-client-envs': JSON.stringify({
144163
ISAACUS_API_KEY: requireValue(
145164
readEnv('ISAACUS_API_KEY') ?? client.apiKey,
146165
'set ISAACUS_API_KEY environment variable or provide apiKey client option',
@@ -157,6 +176,11 @@ const remoteStainlessHandler = async ({
157176
});
158177

159178
if (!res.ok) {
179+
if (res.status === 404 && !reqContext.stainlessApiKey) {
180+
throw new Error(
181+
'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.',
182+
);
183+
}
160184
throw new Error(
161185
`${res.status}: ${
162186
res.statusText

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

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import { Metadata, McpRequestContext, asTextContentResult } from './types';
43
import { Tool } from '@modelcontextprotocol/sdk/types.js';
4+
import { Metadata, McpRequestContext, asTextContentResult } from './types';
5+
import { getLogger } from './logger';
56

67
export const metadata: Metadata = {
78
resource: 'all',
@@ -12,7 +13,8 @@ export const metadata: Metadata = {
1213

1314
export const tool: Tool = {
1415
name: 'search_docs',
15-
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.',
1618
inputSchema: {
1719
type: 'object',
1820
properties: {
@@ -50,19 +52,49 @@ export const handler = async ({
5052
}) => {
5153
const body = args as any;
5254
const query = new URLSearchParams(body).toString();
55+
56+
const startTime = Date.now();
5357
const result = await fetch(`${docsSearchURL}?${query}`, {
5458
headers: {
5559
...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }),
5660
},
5761
});
5862

63+
const logger = getLogger();
64+
5965
if (!result.ok) {
66+
const errorText = await result.text();
67+
logger.warn(
68+
{
69+
durationMs: Date.now() - startTime,
70+
query: body.query,
71+
status: result.status,
72+
statusText: result.statusText,
73+
errorText,
74+
},
75+
'Got error response from docs search tool',
76+
);
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+
6084
throw new Error(
61-
`${result.status}: ${result.statusText} when using doc search tool. Details: ${await result.text()}`,
85+
`${result.status}: ${result.statusText} when using doc search tool. Details: ${errorText}`,
6286
);
6387
}
6488

65-
return asTextContentResult(await result.json());
89+
const resultBody = await result.json();
90+
logger.info(
91+
{
92+
durationMs: Date.now() - startTime,
93+
query: body.query,
94+
},
95+
'Got docs search result',
96+
);
97+
return asTextContentResult(resultBody);
6698
};
6799

68100
export default { metadata, tool, handler };

0 commit comments

Comments
 (0)