Skip to content

Commit e4d8fd3

Browse files
fix(mcp): correct code tool API endpoint
1 parent 6148100 commit e4d8fd3

File tree

8 files changed

+437
-1
lines changed

8 files changed

+437
-1
lines changed

.devcontainer/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# syntax=docker/dockerfile:1
2+
FROM debian:bookworm-slim AS stainless
3+
4+
RUN apt-get update && apt-get install -y \
5+
nodejs \
6+
npm \
7+
yarnpkg \
8+
&& apt-get clean autoclean
9+
10+
# Ensure UTF-8 encoding
11+
ENV LANG=C.UTF-8
12+
ENV LC_ALL=C.UTF-8
13+
14+
# Yarn
15+
RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
16+
17+
WORKDIR /workspace
18+
19+
COPY package.json yarn.lock /workspace/
20+
21+
RUN yarn install
22+
23+
COPY . /workspace

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint', 'unused-imports', 'prettier'],
4+
rules: {
5+
'no-unused-vars': 'off',
6+
'prettier/prettier': 'error',
7+
'unused-imports/no-unused-imports': 'error',
8+
},
9+
root: true,
10+
};

jest.setup.ts

Whitespace-only changes.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function codeTool() {
2828
// will allow you to run code-mode queries against non-published versions of your SDK.
2929
const stainlessAPIKey = readEnv('STAINLESS_API_KEY');
3030
const codeModeEndpoint =
31-
readEnv('CODE_MODE_ENDPOINT_URL') ?? 'https://api.stainless.com/api/ai/code-tool/';
31+
readEnv('CODE_MODE_ENDPOINT_URL') ?? 'https://api.stainless.com/api/ai/code-tool';
3232

3333
const res = await fetch(codeModeEndpoint, {
3434
method: 'POST',

0 commit comments

Comments
 (0)