brand.dev-mcp 0.1.0-alpha.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/filtering.d.mts +2 -0
- package/filtering.d.mts.map +1 -0
- package/filtering.d.ts +2 -0
- package/filtering.d.ts.map +1 -0
- package/filtering.js +21 -0
- package/filtering.js.map +1 -0
- package/filtering.mjs +14 -0
- package/filtering.mjs.map +1 -0
- package/package.json +13 -2
- package/server.d.mts.map +1 -1
- package/server.d.ts.map +1 -1
- package/server.js +2 -6
- package/server.js.map +1 -1
- package/server.mjs +2 -6
- package/server.mjs.map +1 -1
- package/src/filtering.ts +15 -0
- package/src/server.ts +2 -6
- package/src/tools/brand/ai-query-brand.ts +12 -5
- package/src/tools/brand/identify-from-transaction-brand.ts +14 -4
- package/src/tools/brand/prefetch-brand.ts +12 -4
- package/src/tools/brand/retrieve-brand.ts +15 -4
- package/src/tools/brand/retrieve-by-ticker-brand.ts +15 -4
- package/src/tools/brand/retrieve-naics-brand.ts +15 -4
- package/src/tools/brand/retrieve-simplified-brand.ts +14 -4
- package/src/tools/brand/screenshot-brand.ts +14 -4
- package/src/tools/brand/styleguide-brand.ts +6 -3
- package/src/tools/index.ts +0 -2
- package/src/tools/types.ts +1 -1
- package/tools/brand/ai-query-brand.d.mts +1 -1
- package/tools/brand/ai-query-brand.d.mts.map +1 -1
- package/tools/brand/ai-query-brand.d.ts +1 -1
- package/tools/brand/ai-query-brand.d.ts.map +1 -1
- package/tools/brand/ai-query-brand.js +10 -3
- package/tools/brand/ai-query-brand.js.map +1 -1
- package/tools/brand/ai-query-brand.mjs +10 -3
- package/tools/brand/ai-query-brand.mjs.map +1 -1
- package/tools/brand/identify-from-transaction-brand.d.mts +1 -1
- package/tools/brand/identify-from-transaction-brand.d.mts.map +1 -1
- package/tools/brand/identify-from-transaction-brand.d.ts +1 -1
- package/tools/brand/identify-from-transaction-brand.d.ts.map +1 -1
- package/tools/brand/identify-from-transaction-brand.js +12 -2
- package/tools/brand/identify-from-transaction-brand.js.map +1 -1
- package/tools/brand/identify-from-transaction-brand.mjs +12 -2
- package/tools/brand/identify-from-transaction-brand.mjs.map +1 -1
- package/tools/brand/prefetch-brand.d.mts +1 -1
- package/tools/brand/prefetch-brand.d.mts.map +1 -1
- package/tools/brand/prefetch-brand.d.ts +1 -1
- package/tools/brand/prefetch-brand.d.ts.map +1 -1
- package/tools/brand/prefetch-brand.js +10 -2
- package/tools/brand/prefetch-brand.js.map +1 -1
- package/tools/brand/prefetch-brand.mjs +10 -2
- package/tools/brand/prefetch-brand.mjs.map +1 -1
- package/tools/brand/retrieve-brand.d.mts +1 -1
- package/tools/brand/retrieve-brand.d.mts.map +1 -1
- package/tools/brand/retrieve-brand.d.ts +1 -1
- package/tools/brand/retrieve-brand.d.ts.map +1 -1
- package/tools/brand/retrieve-brand.js +12 -2
- package/tools/brand/retrieve-brand.js.map +1 -1
- package/tools/brand/retrieve-brand.mjs +12 -2
- package/tools/brand/retrieve-brand.mjs.map +1 -1
- package/tools/brand/retrieve-by-ticker-brand.d.mts +1 -1
- package/tools/brand/retrieve-by-ticker-brand.d.mts.map +1 -1
- package/tools/brand/retrieve-by-ticker-brand.d.ts +1 -1
- package/tools/brand/retrieve-by-ticker-brand.d.ts.map +1 -1
- package/tools/brand/retrieve-by-ticker-brand.js +12 -2
- package/tools/brand/retrieve-by-ticker-brand.js.map +1 -1
- package/tools/brand/retrieve-by-ticker-brand.mjs +12 -2
- package/tools/brand/retrieve-by-ticker-brand.mjs.map +1 -1
- package/tools/brand/retrieve-naics-brand.d.mts +1 -1
- package/tools/brand/retrieve-naics-brand.d.mts.map +1 -1
- package/tools/brand/retrieve-naics-brand.d.ts +1 -1
- package/tools/brand/retrieve-naics-brand.d.ts.map +1 -1
- package/tools/brand/retrieve-naics-brand.js +12 -2
- package/tools/brand/retrieve-naics-brand.js.map +1 -1
- package/tools/brand/retrieve-naics-brand.mjs +12 -2
- package/tools/brand/retrieve-naics-brand.mjs.map +1 -1
- package/tools/brand/retrieve-simplified-brand.d.mts +1 -1
- package/tools/brand/retrieve-simplified-brand.d.mts.map +1 -1
- package/tools/brand/retrieve-simplified-brand.d.ts +1 -1
- package/tools/brand/retrieve-simplified-brand.d.ts.map +1 -1
- package/tools/brand/retrieve-simplified-brand.js +12 -2
- package/tools/brand/retrieve-simplified-brand.js.map +1 -1
- package/tools/brand/retrieve-simplified-brand.mjs +12 -2
- package/tools/brand/retrieve-simplified-brand.mjs.map +1 -1
- package/tools/brand/screenshot-brand.d.mts +1 -1
- package/tools/brand/screenshot-brand.d.mts.map +1 -1
- package/tools/brand/screenshot-brand.d.ts +1 -1
- package/tools/brand/screenshot-brand.d.ts.map +1 -1
- package/tools/brand/screenshot-brand.js +12 -2
- package/tools/brand/screenshot-brand.js.map +1 -1
- package/tools/brand/screenshot-brand.mjs +12 -2
- package/tools/brand/screenshot-brand.mjs.map +1 -1
- package/tools/brand/styleguide-brand.d.mts +1 -1
- package/tools/brand/styleguide-brand.d.mts.map +1 -1
- package/tools/brand/styleguide-brand.d.ts +1 -1
- package/tools/brand/styleguide-brand.d.ts.map +1 -1
- package/tools/brand/styleguide-brand.js +5 -1
- package/tools/brand/styleguide-brand.js.map +1 -1
- package/tools/brand/styleguide-brand.mjs +5 -1
- package/tools/brand/styleguide-brand.mjs.map +1 -1
- package/tools/index.d.mts.map +1 -1
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +0 -2
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +0 -2
- package/tools/index.mjs.map +1 -1
- package/tools/types.d.mts +1 -1
- package/tools/types.d.mts.map +1 -1
- package/tools/types.d.ts +1 -1
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js.map +1 -1
- package/tools/types.mjs.map +1 -1
- package/src/tools/brand/search-brand.ts +0 -41
- package/tools/brand/search-brand.d.mts +0 -45
- package/tools/brand/search-brand.d.mts.map +0 -1
- package/tools/brand/search-brand.d.ts +0 -45
- package/tools/brand/search-brand.d.ts.map +0 -1
- package/tools/brand/search-brand.js +0 -36
- package/tools/brand/search-brand.js.map +0 -1
- package/tools/brand/search-brand.mjs +0 -32
- package/tools/brand/search-brand.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -175,5 +175,4 @@ The following tools are available in this MCP server.
|
|
|
175
175
|
- `retrieve_naics_brand` (`read`): Endpoint to classify any brand into a 2022 NAICS code.
|
|
176
176
|
- `retrieve_simplified_brand` (`read`): Returns a simplified version of brand data containing only essential information: domain, title, colors, logos, and backdrops. This endpoint is optimized for faster responses and reduced data transfer.
|
|
177
177
|
- `screenshot_brand` (`read`): Beta feature: Capture a screenshot of a website. Supports both viewport (standard browser view) and full-page screenshots. Returns a URL to the uploaded screenshot image hosted on our CDN.
|
|
178
|
-
- `
|
|
179
|
-
- `styleguide_brand` (`read`): Beta feature: Automatically extract comprehensive design system information from a brand's website including colors, typography, spacing, shadows, and UI components. Uses AI-powered analysis of website screenshots to identify design patterns and create a reusable styleguide.
|
|
178
|
+
- `styleguide_brand` (`read`): Beta feature: Automatically extract comprehensive design system information from a brand's website including colors, typography, spacing, shadows, and UI components.
|
package/filtering.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.d.mts","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAOxG"}
|
package/filtering.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAOxG"}
|
package/filtering.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.maybeFilter = maybeFilter;
|
|
7
|
+
// @ts-nocheck
|
|
8
|
+
const jq_web_1 = __importDefault(require("jq-web"));
|
|
9
|
+
async function maybeFilter(args, response) {
|
|
10
|
+
const jqFilter = args?.['jq_filter'];
|
|
11
|
+
if (jqFilter && typeof jqFilter === 'string') {
|
|
12
|
+
return await jq(response, jqFilter);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return response;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
async function jq(json, jqFilter) {
|
|
19
|
+
return (await jq_web_1.default).json(json, jqFilter);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=filtering.js.map
|
package/filtering.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.js","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":";;;;;AAGA,kCAOC;AAVD,cAAc;AACd,oDAA4B;AAErB,KAAK,UAAU,WAAW,CAAC,IAAyC,EAAE,QAAa;IACxF,MAAM,QAAQ,GAAG,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;IACrC,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC7C,OAAO,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC,IAAS,EAAE,QAAgB;IAC3C,OAAO,CAAC,MAAM,gBAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
|
package/filtering.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import initJq from 'jq-web';
|
|
2
|
+
export async function maybeFilter(args, response) {
|
|
3
|
+
const jqFilter = args?.['jq_filter'];
|
|
4
|
+
if (jqFilter && typeof jqFilter === 'string') {
|
|
5
|
+
return await jq(response, jqFilter);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
return response;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
async function jq(json, jqFilter) {
|
|
12
|
+
return (await initJq).json(json, jqFilter);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=filtering.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.mjs","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":"OACO,MAAM,MAAM,QAAQ;AAE3B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAyC,EAAE,QAAa;IACxF,MAAM,QAAQ,GAAG,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;IACrC,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC7C,OAAO,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC,IAAS,EAAE,QAAgB;IAC3C,OAAO,CAAC,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brand.dev-mcp",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "The official MCP Server for the Brand Dev API",
|
|
5
5
|
"author": "Brand Dev <>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
"fix": "eslint --fix --ext ts,js ."
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"brand.dev": "^0.1.0
|
|
27
|
+
"brand.dev": "^0.1.0",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.11.5",
|
|
29
|
+
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.2/jq-web.tar.gz",
|
|
29
30
|
"yargs": "^17.7.2",
|
|
30
31
|
"@cloudflare/cabidela": "^0.2.4",
|
|
31
32
|
"zod": "^3.25.20",
|
|
@@ -67,6 +68,16 @@
|
|
|
67
68
|
"./dynamic-tools.mjs": {
|
|
68
69
|
"default": "./dynamic-tools.mjs"
|
|
69
70
|
},
|
|
71
|
+
"./filtering": {
|
|
72
|
+
"import": "./filtering.mjs",
|
|
73
|
+
"require": "./filtering.js"
|
|
74
|
+
},
|
|
75
|
+
"./filtering.js": {
|
|
76
|
+
"default": "./filtering.js"
|
|
77
|
+
},
|
|
78
|
+
"./filtering.mjs": {
|
|
79
|
+
"default": "./filtering.mjs"
|
|
80
|
+
},
|
|
70
81
|
"./index": {
|
|
71
82
|
"import": "./index.mjs",
|
|
72
83
|
"require": "./index.js"
|
package/server.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.mts","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,MAAM,2CAA2C;OAC3D,EAAE,SAAS,EAAE,MAAM,yCAAyC;OAC5D,EAAE,QAAQ,EAAa,eAAe,EAAS;OAC/C,EAAiD,IAAI,EAAE,MAAM,oCAAoC;OACjG,EAAE,aAAa,EAAE,MAAM,WAAW;OAClC,QAAQ,MAAM,WAAW;OACzB,EAEL,kBAAkB,EAInB;OAEM,EAAE,UAAU,EAAE;OAEd,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE;O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,EAAE,EAAE,OAAO,EAAE,UAAU,cAqBrE;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACzC,oBAAoB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,mDAOnD;AAED,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAO9C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MAM5C,CAAC"}
|
package/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,MAAM,2CAA2C;OAC3D,EAAE,SAAS,EAAE,MAAM,yCAAyC;OAC5D,EAAE,QAAQ,EAAa,eAAe,EAAS;OAC/C,EAAiD,IAAI,EAAE,MAAM,oCAAoC;OACjG,EAAE,aAAa,EAAE,MAAM,WAAW;OAClC,QAAQ,MAAM,WAAW;OACzB,EAEL,kBAAkB,EAInB;OAEM,EAAE,UAAU,EAAE;OAEd,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OACV,EAAE,aAAa,EAAE,MAAM,WAAW;OAClC,EAAE,SAAS,EAAE;AAGpB,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,MAAM,2CAA2C;OAC3D,EAAE,SAAS,EAAE,MAAM,yCAAyC;OAC5D,EAAE,QAAQ,EAAa,eAAe,EAAS;OAC/C,EAAiD,IAAI,EAAE,MAAM,oCAAoC;OACjG,EAAE,aAAa,EAAE,MAAM,WAAW;OAClC,QAAQ,MAAM,WA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AM5C,CAAC"}
|
package/server.js
CHANGED
|
@@ -20,12 +20,8 @@ Object.defineProperty(exports, "endpoints", { enumerable: true, get: function ()
|
|
|
20
20
|
// Create server instance
|
|
21
21
|
exports.server = new mcp_js_1.McpServer({
|
|
22
22
|
name: 'brand_dev_api',
|
|
23
|
-
version: '0.1.0
|
|
24
|
-
}, {
|
|
25
|
-
capabilities: {
|
|
26
|
-
tools: {},
|
|
27
|
-
},
|
|
28
|
-
});
|
|
23
|
+
version: '0.1.0',
|
|
24
|
+
}, { capabilities: { tools: {} } });
|
|
29
25
|
/**
|
|
30
26
|
* Initializes the provided MCP Server with the given tools and handlers.
|
|
31
27
|
* If not provided, the default client, tools and handlers will be used.
|
package/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAqCtF,sCAaC;AAED,oBA4BC;AAKD,kCAqBC;AAKD,wCAYC;AAxHD,oEAAoE;AACpE,sCAAsE;AACtE,iEAAyG;AAEzG,0DAAiC;AACjC,wCAMkB;AAClB,sDAA+C;AAO/C,oCAAoC;AAA3B,kGAAA,SAAS,OAAA;AAElB,yBAAyB;AACZ,QAAA,MAAM,GAAG,IAAI,kBAAS,CACjC;IACE,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,OAAO;CACjB,EACD,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAChC,CAAC;AAEF;;;GAGG;AACH,SAAgB,aAAa,CAAC,MAK7B;IACC,MAAM,oBAAoB,GAAG,WAAW,CAAC,iBAAS,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IACvE,MAAM,MAAM,GAAG,IAAI,mBAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAClD,MAA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11
11
|
name: 'brand_dev_api',
|
|
12
|
-
version: '0.1.0
|
|
13
|
-
}, {
|
|
14
|
-
capabilities: {
|
|
15
|
-
tools: {},
|
|
16
|
-
},
|
|
17
|
-
});
|
|
12
|
+
version: '0.1.0',
|
|
13
|
+
}, { capabilities: { tools: {} } });
|
|
18
14
|
/**
|
|
19
15
|
* Initializes the provided MCP Server with the given tools and handlers.
|
|
20
16
|
* If not provided, the default client, tools and handlers will be used.
|
package/server.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.mjs","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,SAAS,EAAE,MAAM,yCAAyC;OAC5D,EAAY,SAAS,EAAmB,KAAK,EAAE;OAC/C,EAAE,qBAAqB,EAAE,sBAAsB,EAAQ,MAAM,oCAAoC;OAEjG,QAAQ,MAAM,WAAW;OACzB,EACL,iCAAiC,EAEjC,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,GAClB;OACM,EAAE,YAAY,EAAE;OAOhB,EAAE,SAAS,EAAE;AAEpB,yBAAyB;AACzB,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,SAAS,CACjC;IACE,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"server.mjs","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,SAAS,EAAE,MAAM,yCAAyC;OAC5D,EAAY,SAAS,EAAmB,KAAK,EAAE;OAC/C,EAAE,qBAAqB,EAAE,sBAAsB,EAAQ,MAAM,oCAAoC;OAEjG,QAAQ,MAAM,WAAW;OACzB,EACL,iCAAiC,EAEjC,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,GAClB;OACM,EAAE,YAAY,EAAE;OAOhB,EAAE,SAAS,EAAE;AAEpB,yBAAyB;AACzB,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,SAAS,CACjC;IACE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C;IAC5B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,aAAa,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
package/src/filtering.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import initJq from 'jq-web';
|
|
3
|
+
|
|
4
|
+
export async function maybeFilter(args: Record<string, unknown> | undefined, response: any): Promise<any> {
|
|
5
|
+
const jqFilter = args?.['jq_filter'];
|
|
6
|
+
if (jqFilter && typeof jqFilter === 'string') {
|
|
7
|
+
return await jq(response, jqFilter);
|
|
8
|
+
} else {
|
|
9
|
+
return response;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async function jq(json: any, jqFilter: string) {
|
|
14
|
+
return (await initJq).json(json, jqFilter);
|
|
15
|
+
}
|
package/src/server.ts
CHANGED
|
@@ -26,13 +26,9 @@ export { endpoints } from './tools';
|
|
|
26
26
|
export const server = new McpServer(
|
|
27
27
|
{
|
|
28
28
|
name: 'brand_dev_api',
|
|
29
|
-
version: '0.1.0
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
capabilities: {
|
|
33
|
-
tools: {},
|
|
34
|
-
},
|
|
29
|
+
version: '0.1.0',
|
|
35
30
|
},
|
|
31
|
+
{ capabilities: { tools: {} } },
|
|
36
32
|
);
|
|
37
33
|
|
|
38
34
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { maybeFilter } from 'brand.dev-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from 'brand.dev-mcp/tools/types';
|
|
4
5
|
|
|
5
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import type { Metadata } from '../';
|
|
7
7
|
import BrandDev from 'brand.dev';
|
|
8
8
|
|
|
9
9
|
export const metadata: Metadata = {
|
|
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'ai_query_brand',
|
|
19
19
|
description:
|
|
20
|
-
"
|
|
20
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nBeta feature: Use AI to extract specific data points from a brand's website. The AI will crawl the website and extract the requested information based on the provided data points.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data_extracted: {\n type: 'array',\n description: 'Array of extracted data points',\n items: {\n type: 'object',\n properties: {\n datapoint_name: {\n type: 'string',\n description: 'Name of the extracted data point'\n },\n datapoint_value: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'number'\n },\n {\n type: 'boolean'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n },\n {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n ],\n description: 'Value of the extracted data point'\n }\n }\n }\n },\n domain: {\n type: 'string',\n description: 'The domain that was analyzed'\n },\n status: {\n type: 'string',\n description: 'Status of the response, e.g., \\'ok\\''\n },\n urls_analyzed: {\n type: 'array',\n description: 'List of URLs that were analyzed',\n items: {\n type: 'string'\n }\n }\n }\n}\n```",
|
|
21
21
|
inputSchema: {
|
|
22
22
|
type: 'object',
|
|
23
23
|
properties: {
|
|
@@ -89,20 +89,27 @@ export const tool: Tool = {
|
|
|
89
89
|
description: 'Whether to analyze the terms and conditions page',
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
|
-
required: [],
|
|
93
92
|
},
|
|
94
93
|
timeoutMS: {
|
|
95
94
|
type: 'integer',
|
|
96
95
|
description:
|
|
97
96
|
'Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).',
|
|
98
97
|
},
|
|
98
|
+
jq_filter: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
title: 'jq Filter',
|
|
101
|
+
description:
|
|
102
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
103
|
+
},
|
|
99
104
|
},
|
|
105
|
+
required: ['data_to_extract', 'domain'],
|
|
100
106
|
},
|
|
107
|
+
annotations: {},
|
|
101
108
|
};
|
|
102
109
|
|
|
103
110
|
export const handler = async (client: BrandDev, args: Record<string, unknown> | undefined) => {
|
|
104
111
|
const body = args as any;
|
|
105
|
-
return asTextContentResult(await client.brand.aiQuery(body));
|
|
112
|
+
return asTextContentResult(await maybeFilter(args, await client.brand.aiQuery(body)));
|
|
106
113
|
};
|
|
107
114
|
|
|
108
115
|
export default { metadata, tool, handler };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { maybeFilter } from 'brand.dev-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from 'brand.dev-mcp/tools/types';
|
|
4
5
|
|
|
5
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import type { Metadata } from '../';
|
|
7
7
|
import BrandDev from 'brand.dev';
|
|
8
8
|
|
|
9
9
|
export const metadata: Metadata = {
|
|
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'identify_from_transaction_brand',
|
|
19
19
|
description:
|
|
20
|
-
'
|
|
20
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nEndpoint specially designed for platforms that want to identify transaction data by the transaction title.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n brand: {\n type: 'object',\n description: 'Detailed brand information',\n properties: {\n address: {\n type: 'object',\n description: 'Physical address of the brand',\n properties: {\n city: {\n type: 'string',\n description: 'City name'\n },\n country: {\n type: 'string',\n description: 'Country name'\n },\n country_code: {\n type: 'string',\n description: 'Country code'\n },\n postal_code: {\n type: 'string',\n description: 'Postal or ZIP code'\n },\n state_code: {\n type: 'string',\n description: 'State or province code'\n },\n state_province: {\n type: 'string',\n description: 'State or province name'\n },\n street: {\n type: 'string',\n description: 'Street address'\n }\n }\n },\n backdrops: {\n type: 'array',\n description: 'An array of backdrop images for the brand',\n items: {\n type: 'object',\n properties: {\n colors: {\n type: 'array',\n description: 'Array of colors in the backdrop image',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n resolution: {\n type: 'object',\n description: 'Resolution of the backdrop image',\n properties: {\n aspect_ratio: {\n type: 'number',\n description: 'Aspect ratio of the image (width/height)'\n },\n height: {\n type: 'integer',\n description: 'Height of the image in pixels'\n },\n width: {\n type: 'integer',\n description: 'Width of the image in pixels'\n }\n }\n },\n url: {\n type: 'string',\n description: 'URL of the backdrop image'\n }\n }\n }\n },\n colors: {\n type: 'array',\n description: 'An array of brand colors',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n description: {\n type: 'string',\n description: 'A brief description of the brand'\n },\n domain: {\n type: 'string',\n description: 'The domain name of the brand'\n },\n email: {\n type: 'string',\n description: 'Company email address'\n },\n is_nsfw: {\n type: 'boolean',\n description: 'Indicates whether the brand content is not safe for work (NSFW)'\n },\n logos: {\n type: 'array',\n description: 'An array of logos associated with the brand',\n items: {\n type: 'object',\n properties: {\n colors: {\n type: 'array',\n description: 'Array of colors in the logo',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n mode: {\n type: 'string',\n description: 'Indicates when this logo is best used: \\'light\\' = best for light mode, \\'dark\\' = best for dark mode, \\'has_opaque_background\\' = can be used for either as image has its own background',\n enum: [ 'light',\n 'dark',\n 'has_opaque_background'\n ]\n },\n resolution: {\n type: 'object',\n description: 'Resolution of the logo image',\n properties: {\n aspect_ratio: {\n type: 'number',\n description: 'Aspect ratio of the image (width/height)'\n },\n height: {\n type: 'integer',\n description: 'Height of the image in pixels'\n },\n width: {\n type: 'integer',\n description: 'Width of the image in pixels'\n }\n }\n },\n type: {\n type: 'string',\n description: 'Type of the logo based on resolution (e.g., \\'icon\\', \\'logo\\')',\n enum: [ 'icon',\n 'logo'\n ]\n },\n url: {\n type: 'string',\n description: 'CDN hosted url of the logo (ready for display)'\n }\n }\n }\n },\n phone: {\n type: 'string',\n description: 'Company phone number'\n },\n slogan: {\n type: 'string',\n description: 'The brand\\'s slogan'\n },\n socials: {\n type: 'array',\n description: 'An array of social media links for the brand',\n items: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n description: 'Type of social media, e.g., \\'facebook\\', \\'twitter\\''\n },\n url: {\n type: 'string',\n description: 'URL of the social media page'\n }\n }\n }\n },\n stock: {\n type: 'object',\n description: 'Stock market information for this brand (will be null if not a publicly traded company)',\n properties: {\n exchange: {\n type: 'string',\n description: 'Stock exchange name'\n },\n ticker: {\n type: 'string',\n description: 'Stock ticker symbol'\n }\n }\n },\n title: {\n type: 'string',\n description: 'The title or name of the brand'\n }\n }\n },\n code: {\n type: 'integer',\n description: 'HTTP status code'\n },\n status: {\n type: 'string',\n description: 'Status of the response, e.g., \\'ok\\''\n }\n }\n}\n```",
|
|
21
21
|
inputSchema: {
|
|
22
22
|
type: 'object',
|
|
23
23
|
properties: {
|
|
@@ -30,13 +30,23 @@ export const tool: Tool = {
|
|
|
30
30
|
description:
|
|
31
31
|
'Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).',
|
|
32
32
|
},
|
|
33
|
+
jq_filter: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
title: 'jq Filter',
|
|
36
|
+
description:
|
|
37
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
38
|
+
},
|
|
33
39
|
},
|
|
40
|
+
required: ['transaction_info'],
|
|
41
|
+
},
|
|
42
|
+
annotations: {
|
|
43
|
+
readOnlyHint: true,
|
|
34
44
|
},
|
|
35
45
|
};
|
|
36
46
|
|
|
37
47
|
export const handler = async (client: BrandDev, args: Record<string, unknown> | undefined) => {
|
|
38
48
|
const body = args as any;
|
|
39
|
-
return asTextContentResult(await client.brand.identifyFromTransaction(body));
|
|
49
|
+
return asTextContentResult(await maybeFilter(args, await client.brand.identifyFromTransaction(body)));
|
|
40
50
|
};
|
|
41
51
|
|
|
42
52
|
export default { metadata, tool, handler };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { maybeFilter } from 'brand.dev-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from 'brand.dev-mcp/tools/types';
|
|
4
5
|
|
|
5
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import type { Metadata } from '../';
|
|
7
7
|
import BrandDev from 'brand.dev';
|
|
8
8
|
|
|
9
9
|
export const metadata: Metadata = {
|
|
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'prefetch_brand',
|
|
19
19
|
description:
|
|
20
|
-
'
|
|
20
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nSignal that you may fetch brand data for a particular domain soon to improve latency. This endpoint does not charge credits and is available for paid customers to optimize future requests. [You must be on a paid plan to use this endpoint]\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n domain: {\n type: 'string',\n description: 'The domain that was queued for prefetching'\n },\n message: {\n type: 'string',\n description: 'Success message'\n },\n status: {\n type: 'string',\n description: 'Status of the response, e.g., \\'ok\\''\n }\n }\n}\n```",
|
|
21
21
|
inputSchema: {
|
|
22
22
|
type: 'object',
|
|
23
23
|
properties: {
|
|
@@ -30,13 +30,21 @@ export const tool: Tool = {
|
|
|
30
30
|
description:
|
|
31
31
|
'Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).',
|
|
32
32
|
},
|
|
33
|
+
jq_filter: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
title: 'jq Filter',
|
|
36
|
+
description:
|
|
37
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
38
|
+
},
|
|
33
39
|
},
|
|
40
|
+
required: ['domain'],
|
|
34
41
|
},
|
|
42
|
+
annotations: {},
|
|
35
43
|
};
|
|
36
44
|
|
|
37
45
|
export const handler = async (client: BrandDev, args: Record<string, unknown> | undefined) => {
|
|
38
46
|
const body = args as any;
|
|
39
|
-
return asTextContentResult(await client.brand.prefetch(body));
|
|
47
|
+
return asTextContentResult(await maybeFilter(args, await client.brand.prefetch(body)));
|
|
40
48
|
};
|
|
41
49
|
|
|
42
50
|
export default { metadata, tool, handler };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { maybeFilter } from 'brand.dev-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from 'brand.dev-mcp/tools/types';
|
|
4
5
|
|
|
5
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import type { Metadata } from '../';
|
|
7
7
|
import BrandDev from 'brand.dev';
|
|
8
8
|
|
|
9
9
|
export const metadata: Metadata = {
|
|
@@ -16,7 +16,8 @@ export const metadata: Metadata = {
|
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'retrieve_brand',
|
|
19
|
-
description:
|
|
19
|
+
description:
|
|
20
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve brand data by domain\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n brand: {\n type: 'object',\n description: 'Detailed brand information',\n properties: {\n address: {\n type: 'object',\n description: 'Physical address of the brand',\n properties: {\n city: {\n type: 'string',\n description: 'City name'\n },\n country: {\n type: 'string',\n description: 'Country name'\n },\n country_code: {\n type: 'string',\n description: 'Country code'\n },\n postal_code: {\n type: 'string',\n description: 'Postal or ZIP code'\n },\n state_code: {\n type: 'string',\n description: 'State or province code'\n },\n state_province: {\n type: 'string',\n description: 'State or province name'\n },\n street: {\n type: 'string',\n description: 'Street address'\n }\n }\n },\n backdrops: {\n type: 'array',\n description: 'An array of backdrop images for the brand',\n items: {\n type: 'object',\n properties: {\n colors: {\n type: 'array',\n description: 'Array of colors in the backdrop image',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n resolution: {\n type: 'object',\n description: 'Resolution of the backdrop image',\n properties: {\n aspect_ratio: {\n type: 'number',\n description: 'Aspect ratio of the image (width/height)'\n },\n height: {\n type: 'integer',\n description: 'Height of the image in pixels'\n },\n width: {\n type: 'integer',\n description: 'Width of the image in pixels'\n }\n }\n },\n url: {\n type: 'string',\n description: 'URL of the backdrop image'\n }\n }\n }\n },\n colors: {\n type: 'array',\n description: 'An array of brand colors',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n description: {\n type: 'string',\n description: 'A brief description of the brand'\n },\n domain: {\n type: 'string',\n description: 'The domain name of the brand'\n },\n email: {\n type: 'string',\n description: 'Company email address'\n },\n is_nsfw: {\n type: 'boolean',\n description: 'Indicates whether the brand content is not safe for work (NSFW)'\n },\n logos: {\n type: 'array',\n description: 'An array of logos associated with the brand',\n items: {\n type: 'object',\n properties: {\n colors: {\n type: 'array',\n description: 'Array of colors in the logo',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n mode: {\n type: 'string',\n description: 'Indicates when this logo is best used: \\'light\\' = best for light mode, \\'dark\\' = best for dark mode, \\'has_opaque_background\\' = can be used for either as image has its own background',\n enum: [ 'light',\n 'dark',\n 'has_opaque_background'\n ]\n },\n resolution: {\n type: 'object',\n description: 'Resolution of the logo image',\n properties: {\n aspect_ratio: {\n type: 'number',\n description: 'Aspect ratio of the image (width/height)'\n },\n height: {\n type: 'integer',\n description: 'Height of the image in pixels'\n },\n width: {\n type: 'integer',\n description: 'Width of the image in pixels'\n }\n }\n },\n type: {\n type: 'string',\n description: 'Type of the logo based on resolution (e.g., \\'icon\\', \\'logo\\')',\n enum: [ 'icon',\n 'logo'\n ]\n },\n url: {\n type: 'string',\n description: 'CDN hosted url of the logo (ready for display)'\n }\n }\n }\n },\n phone: {\n type: 'string',\n description: 'Company phone number'\n },\n slogan: {\n type: 'string',\n description: 'The brand\\'s slogan'\n },\n socials: {\n type: 'array',\n description: 'An array of social media links for the brand',\n items: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n description: 'Type of social media, e.g., \\'facebook\\', \\'twitter\\''\n },\n url: {\n type: 'string',\n description: 'URL of the social media page'\n }\n }\n }\n },\n stock: {\n type: 'object',\n description: 'Stock market information for this brand (will be null if not a publicly traded company)',\n properties: {\n exchange: {\n type: 'string',\n description: 'Stock exchange name'\n },\n ticker: {\n type: 'string',\n description: 'Stock ticker symbol'\n }\n }\n },\n title: {\n type: 'string',\n description: 'The title or name of the brand'\n }\n }\n },\n code: {\n type: 'integer',\n description: 'HTTP status code'\n },\n status: {\n type: 'string',\n description: 'Status of the response, e.g., \\'ok\\''\n }\n }\n}\n```",
|
|
20
21
|
inputSchema: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
properties: {
|
|
@@ -92,13 +93,23 @@ export const tool: Tool = {
|
|
|
92
93
|
description:
|
|
93
94
|
'Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).',
|
|
94
95
|
},
|
|
96
|
+
jq_filter: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
title: 'jq Filter',
|
|
99
|
+
description:
|
|
100
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
101
|
+
},
|
|
95
102
|
},
|
|
103
|
+
required: ['domain'],
|
|
104
|
+
},
|
|
105
|
+
annotations: {
|
|
106
|
+
readOnlyHint: true,
|
|
96
107
|
},
|
|
97
108
|
};
|
|
98
109
|
|
|
99
110
|
export const handler = async (client: BrandDev, args: Record<string, unknown> | undefined) => {
|
|
100
111
|
const body = args as any;
|
|
101
|
-
return asTextContentResult(await client.brand.retrieve(body));
|
|
112
|
+
return asTextContentResult(await maybeFilter(args, await client.brand.retrieve(body)));
|
|
102
113
|
};
|
|
103
114
|
|
|
104
115
|
export default { metadata, tool, handler };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { maybeFilter } from 'brand.dev-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from 'brand.dev-mcp/tools/types';
|
|
4
5
|
|
|
5
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import type { Metadata } from '../';
|
|
7
7
|
import BrandDev from 'brand.dev';
|
|
8
8
|
|
|
9
9
|
export const metadata: Metadata = {
|
|
@@ -16,7 +16,8 @@ export const metadata: Metadata = {
|
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'retrieve_by_ticker_brand',
|
|
19
|
-
description:
|
|
19
|
+
description:
|
|
20
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve brand data by stock ticker (e.g. AAPL, TSLA, etc.)\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n brand: {\n type: 'object',\n description: 'Detailed brand information',\n properties: {\n address: {\n type: 'object',\n description: 'Physical address of the brand',\n properties: {\n city: {\n type: 'string',\n description: 'City name'\n },\n country: {\n type: 'string',\n description: 'Country name'\n },\n country_code: {\n type: 'string',\n description: 'Country code'\n },\n postal_code: {\n type: 'string',\n description: 'Postal or ZIP code'\n },\n state_code: {\n type: 'string',\n description: 'State or province code'\n },\n state_province: {\n type: 'string',\n description: 'State or province name'\n },\n street: {\n type: 'string',\n description: 'Street address'\n }\n }\n },\n backdrops: {\n type: 'array',\n description: 'An array of backdrop images for the brand',\n items: {\n type: 'object',\n properties: {\n colors: {\n type: 'array',\n description: 'Array of colors in the backdrop image',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n resolution: {\n type: 'object',\n description: 'Resolution of the backdrop image',\n properties: {\n aspect_ratio: {\n type: 'number',\n description: 'Aspect ratio of the image (width/height)'\n },\n height: {\n type: 'integer',\n description: 'Height of the image in pixels'\n },\n width: {\n type: 'integer',\n description: 'Width of the image in pixels'\n }\n }\n },\n url: {\n type: 'string',\n description: 'URL of the backdrop image'\n }\n }\n }\n },\n colors: {\n type: 'array',\n description: 'An array of brand colors',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n description: {\n type: 'string',\n description: 'A brief description of the brand'\n },\n domain: {\n type: 'string',\n description: 'The domain name of the brand'\n },\n email: {\n type: 'string',\n description: 'Company email address'\n },\n is_nsfw: {\n type: 'boolean',\n description: 'Indicates whether the brand content is not safe for work (NSFW)'\n },\n logos: {\n type: 'array',\n description: 'An array of logos associated with the brand',\n items: {\n type: 'object',\n properties: {\n colors: {\n type: 'array',\n description: 'Array of colors in the logo',\n items: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Color in hexadecimal format'\n },\n name: {\n type: 'string',\n description: 'Name of the color'\n }\n }\n }\n },\n mode: {\n type: 'string',\n description: 'Indicates when this logo is best used: \\'light\\' = best for light mode, \\'dark\\' = best for dark mode, \\'has_opaque_background\\' = can be used for either as image has its own background',\n enum: [ 'light',\n 'dark',\n 'has_opaque_background'\n ]\n },\n resolution: {\n type: 'object',\n description: 'Resolution of the logo image',\n properties: {\n aspect_ratio: {\n type: 'number',\n description: 'Aspect ratio of the image (width/height)'\n },\n height: {\n type: 'integer',\n description: 'Height of the image in pixels'\n },\n width: {\n type: 'integer',\n description: 'Width of the image in pixels'\n }\n }\n },\n type: {\n type: 'string',\n description: 'Type of the logo based on resolution (e.g., \\'icon\\', \\'logo\\')',\n enum: [ 'icon',\n 'logo'\n ]\n },\n url: {\n type: 'string',\n description: 'CDN hosted url of the logo (ready for display)'\n }\n }\n }\n },\n phone: {\n type: 'string',\n description: 'Company phone number'\n },\n slogan: {\n type: 'string',\n description: 'The brand\\'s slogan'\n },\n socials: {\n type: 'array',\n description: 'An array of social media links for the brand',\n items: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n description: 'Type of social media, e.g., \\'facebook\\', \\'twitter\\''\n },\n url: {\n type: 'string',\n description: 'URL of the social media page'\n }\n }\n }\n },\n stock: {\n type: 'object',\n description: 'Stock market information for this brand (will be null if not a publicly traded company)',\n properties: {\n exchange: {\n type: 'string',\n description: 'Stock exchange name'\n },\n ticker: {\n type: 'string',\n description: 'Stock ticker symbol'\n }\n }\n },\n title: {\n type: 'string',\n description: 'The title or name of the brand'\n }\n }\n },\n code: {\n type: 'integer',\n description: 'HTTP status code'\n },\n status: {\n type: 'string',\n description: 'Status of the response, e.g., \\'ok\\''\n }\n }\n}\n```",
|
|
20
21
|
inputSchema: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
properties: {
|
|
@@ -29,13 +30,23 @@ export const tool: Tool = {
|
|
|
29
30
|
description:
|
|
30
31
|
'Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).',
|
|
31
32
|
},
|
|
33
|
+
jq_filter: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
title: 'jq Filter',
|
|
36
|
+
description:
|
|
37
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
38
|
+
},
|
|
32
39
|
},
|
|
40
|
+
required: ['ticker'],
|
|
41
|
+
},
|
|
42
|
+
annotations: {
|
|
43
|
+
readOnlyHint: true,
|
|
33
44
|
},
|
|
34
45
|
};
|
|
35
46
|
|
|
36
47
|
export const handler = async (client: BrandDev, args: Record<string, unknown> | undefined) => {
|
|
37
48
|
const body = args as any;
|
|
38
|
-
return asTextContentResult(await client.brand.retrieveByTicker(body));
|
|
49
|
+
return asTextContentResult(await maybeFilter(args, await client.brand.retrieveByTicker(body)));
|
|
39
50
|
};
|
|
40
51
|
|
|
41
52
|
export default { metadata, tool, handler };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { maybeFilter } from 'brand.dev-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from 'brand.dev-mcp/tools/types';
|
|
4
5
|
|
|
5
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import type { Metadata } from '../';
|
|
7
7
|
import BrandDev from 'brand.dev';
|
|
8
8
|
|
|
9
9
|
export const metadata: Metadata = {
|
|
@@ -16,7 +16,8 @@ export const metadata: Metadata = {
|
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'retrieve_naics_brand',
|
|
19
|
-
description:
|
|
19
|
+
description:
|
|
20
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nEndpoint to classify any brand into a 2022 NAICS code.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n codes: {\n type: 'array',\n description: 'Array of NAICS codes and titles.',\n items: {\n type: 'object',\n properties: {\n code: {\n type: 'string',\n description: 'NAICS code'\n },\n title: {\n type: 'string',\n description: 'NAICS title'\n }\n }\n }\n },\n domain: {\n type: 'string',\n description: 'Domain found for the brand'\n },\n status: {\n type: 'string',\n description: 'Status of the response, e.g., \\'ok\\''\n },\n type: {\n type: 'string',\n description: 'Industry classification type, for naics api it will be `naics`'\n }\n }\n}\n```",
|
|
20
21
|
inputSchema: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
properties: {
|
|
@@ -30,13 +31,23 @@ export const tool: Tool = {
|
|
|
30
31
|
description:
|
|
31
32
|
'Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).',
|
|
32
33
|
},
|
|
34
|
+
jq_filter: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
title: 'jq Filter',
|
|
37
|
+
description:
|
|
38
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
39
|
+
},
|
|
33
40
|
},
|
|
41
|
+
required: ['input'],
|
|
42
|
+
},
|
|
43
|
+
annotations: {
|
|
44
|
+
readOnlyHint: true,
|
|
34
45
|
},
|
|
35
46
|
};
|
|
36
47
|
|
|
37
48
|
export const handler = async (client: BrandDev, args: Record<string, unknown> | undefined) => {
|
|
38
49
|
const body = args as any;
|
|
39
|
-
return asTextContentResult(await client.brand.retrieveNaics(body));
|
|
50
|
+
return asTextContentResult(await maybeFilter(args, await client.brand.retrieveNaics(body)));
|
|
40
51
|
};
|
|
41
52
|
|
|
42
53
|
export default { metadata, tool, handler };
|