Skip to content

Commit 0202ca7

Browse files
authored
Merge pull request #48 from brand-dot-dev/release-please--branches--main--changes--next--components--brand.dev
release: 0.29.2
2 parents 3be1a8e + 287eb96 commit 0202ca7

File tree

11 files changed

+36
-24
lines changed

11 files changed

+36
-24
lines changed

.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/brand.dev-typescript'
58+
if: |-
59+
github.repository == 'stainless-sdks/brand.dev-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/brand.dev-typescript'
67+
if: |-
68+
github.repository == 'stainless-sdks/brand.dev-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/brand.dev-typescript'
77+
if: |-
78+
github.repository == 'stainless-sdks/brand.dev-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.29.1"
2+
".": "0.29.2"
33
}

CHANGELOG.md

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

3+
## 0.29.2 (2026-03-07)
4+
5+
Full Changelog: [v0.29.1...v0.29.2](https://github.com/brand-dot-dev/typescript-sdk/compare/v0.29.1...v0.29.2)
6+
7+
### Bug Fixes
8+
9+
* **client:** preserve URL params already embedded in path ([1d7e6f0](https://github.com/brand-dot-dev/typescript-sdk/commit/1d7e6f06c0377ccf9635519bcc63b91ef54d14bf))
10+
11+
12+
### Chores
13+
14+
* **ci:** skip uploading artifacts on stainless-internal branches ([7ffeb53](https://github.com/brand-dot-dev/typescript-sdk/commit/7ffeb53bfa12ea6e2e65826cf67a81e5840d3a01))
15+
* **mcp-server:** improve instructions ([8c60a40](https://github.com/brand-dot-dev/typescript-sdk/commit/8c60a40f79a2d345baf2bfacbe6159a37de59b6f))
16+
317
## 0.29.1 (2026-03-06)
418

519
Full Changelog: [v0.29.0...v0.29.1](https://github.com/brand-dot-dev/typescript-sdk/compare/v0.29.0...v0.29.1)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "brand.dev",
3-
"version": "0.29.1",
3+
"version": "0.29.2",
44
"description": "The official TypeScript library for the Brand Dev API",
55
"author": "Brand Dev <hello@brand.dev>",
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": "brand.dev-mcp",
4-
"version": "0.29.1",
4+
"version": "0.29.2",
55
"description": "The official MCP Server for the Brand Dev API",
66
"author": {
77
"name": "Brand Dev",

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": "brand.dev-mcp",
3-
"version": "0.29.1",
3+
"version": "0.29.2",
44
"description": "The official MCP Server for the Brand Dev API",
55
"author": "Brand Dev <hello@brand.dev>",
66
"types": "dist/index.d.ts",

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

Lines changed: 2 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: {

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 brand.dev 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 brand.dev 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: 'brand_dev_api',
23-
version: '0.29.1',
23+
version: '0.29.2',
2424
},
2525
{
2626
instructions: await getInstructions(stainlessApiKey),

src/client.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,9 @@ export class BrandDev {
289289
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
290290

291291
const defaultQuery = this.defaultQuery();
292-
if (!isEmptyObj(defaultQuery)) {
293-
query = { ...defaultQuery, ...query };
292+
const pathQuery = Object.fromEntries(url.searchParams);
293+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
294+
query = { ...pathQuery, ...defaultQuery, ...query };
294295
}
295296

296297
if (typeof query === 'object' && query && !Array.isArray(query)) {

0 commit comments

Comments
 (0)