profound-mcp 0.10.0 → 0.10.1

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.
Files changed (71) hide show
  1. package/filtering.d.mts +1 -0
  2. package/filtering.d.mts.map +1 -1
  3. package/filtering.d.ts +1 -0
  4. package/filtering.d.ts.map +1 -1
  5. package/filtering.js +4 -0
  6. package/filtering.js.map +1 -1
  7. package/filtering.mjs +3 -0
  8. package/filtering.mjs.map +1 -1
  9. package/package.json +3 -3
  10. package/server.js +1 -1
  11. package/server.mjs +1 -1
  12. package/src/filtering.ts +4 -0
  13. package/src/server.ts +1 -1
  14. package/src/tools/organizations/categories/list-organizations-categories.ts +10 -3
  15. package/src/tools/organizations/categories/prompts-organizations-categories.ts +12 -5
  16. package/src/tools/organizations/categories/tags-organizations-categories.ts +12 -5
  17. package/src/tools/organizations/categories/topics-organizations-categories.ts +12 -5
  18. package/src/tools/organizations/domains-organizations.ts +10 -3
  19. package/src/tools/organizations/models-organizations.ts +10 -3
  20. package/src/tools/organizations/regions-organizations.ts +10 -3
  21. package/src/tools/types.ts +12 -0
  22. package/tools/organizations/categories/list-organizations-categories.d.mts.map +1 -1
  23. package/tools/organizations/categories/list-organizations-categories.d.ts.map +1 -1
  24. package/tools/organizations/categories/list-organizations-categories.js +9 -1
  25. package/tools/organizations/categories/list-organizations-categories.js.map +1 -1
  26. package/tools/organizations/categories/list-organizations-categories.mjs +11 -3
  27. package/tools/organizations/categories/list-organizations-categories.mjs.map +1 -1
  28. package/tools/organizations/categories/prompts-organizations-categories.d.mts.map +1 -1
  29. package/tools/organizations/categories/prompts-organizations-categories.d.ts.map +1 -1
  30. package/tools/organizations/categories/prompts-organizations-categories.js +9 -1
  31. package/tools/organizations/categories/prompts-organizations-categories.js.map +1 -1
  32. package/tools/organizations/categories/prompts-organizations-categories.mjs +11 -3
  33. package/tools/organizations/categories/prompts-organizations-categories.mjs.map +1 -1
  34. package/tools/organizations/categories/tags-organizations-categories.d.mts.map +1 -1
  35. package/tools/organizations/categories/tags-organizations-categories.d.ts.map +1 -1
  36. package/tools/organizations/categories/tags-organizations-categories.js +9 -1
  37. package/tools/organizations/categories/tags-organizations-categories.js.map +1 -1
  38. package/tools/organizations/categories/tags-organizations-categories.mjs +11 -3
  39. package/tools/organizations/categories/tags-organizations-categories.mjs.map +1 -1
  40. package/tools/organizations/categories/topics-organizations-categories.d.mts.map +1 -1
  41. package/tools/organizations/categories/topics-organizations-categories.d.ts.map +1 -1
  42. package/tools/organizations/categories/topics-organizations-categories.js +9 -1
  43. package/tools/organizations/categories/topics-organizations-categories.js.map +1 -1
  44. package/tools/organizations/categories/topics-organizations-categories.mjs +11 -3
  45. package/tools/organizations/categories/topics-organizations-categories.mjs.map +1 -1
  46. package/tools/organizations/domains-organizations.d.mts.map +1 -1
  47. package/tools/organizations/domains-organizations.d.ts.map +1 -1
  48. package/tools/organizations/domains-organizations.js +9 -1
  49. package/tools/organizations/domains-organizations.js.map +1 -1
  50. package/tools/organizations/domains-organizations.mjs +11 -3
  51. package/tools/organizations/domains-organizations.mjs.map +1 -1
  52. package/tools/organizations/models-organizations.d.mts.map +1 -1
  53. package/tools/organizations/models-organizations.d.ts.map +1 -1
  54. package/tools/organizations/models-organizations.js +9 -1
  55. package/tools/organizations/models-organizations.js.map +1 -1
  56. package/tools/organizations/models-organizations.mjs +11 -3
  57. package/tools/organizations/models-organizations.mjs.map +1 -1
  58. package/tools/organizations/regions-organizations.d.mts.map +1 -1
  59. package/tools/organizations/regions-organizations.d.ts.map +1 -1
  60. package/tools/organizations/regions-organizations.js +9 -1
  61. package/tools/organizations/regions-organizations.js.map +1 -1
  62. package/tools/organizations/regions-organizations.mjs +11 -3
  63. package/tools/organizations/regions-organizations.mjs.map +1 -1
  64. package/tools/types.d.mts +1 -0
  65. package/tools/types.d.mts.map +1 -1
  66. package/tools/types.d.ts +1 -0
  67. package/tools/types.d.ts.map +1 -1
  68. package/tools/types.js +12 -0
  69. package/tools/types.js.map +1 -1
  70. package/tools/types.mjs +11 -0
  71. package/tools/types.mjs.map +1 -1
package/filtering.d.mts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare function maybeFilter(jqFilter: unknown | undefined, response: any): Promise<any>;
2
+ export declare function isJqError(error: any): error is Error;
2
3
  //# sourceMappingURL=filtering.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filtering.d.mts","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAM5F"}
1
+ {"version":3,"file":"filtering.d.mts","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAM5F;AAMD,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,KAAK,CAEpD"}
package/filtering.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare function maybeFilter(jqFilter: unknown | undefined, response: any): Promise<any>;
2
+ export declare function isJqError(error: any): error is Error;
2
3
  //# sourceMappingURL=filtering.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAM5F"}
1
+ {"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAM5F;AAMD,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,KAAK,CAEpD"}
package/filtering.js CHANGED
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.maybeFilter = maybeFilter;
7
+ exports.isJqError = isJqError;
7
8
  // @ts-nocheck
8
9
  const jq_web_1 = __importDefault(require("jq-web"));
9
10
  async function maybeFilter(jqFilter, response) {
@@ -17,4 +18,7 @@ async function maybeFilter(jqFilter, response) {
17
18
  async function jq(json, jqFilter) {
18
19
  return (await jq_web_1.default).json(json, jqFilter);
19
20
  }
21
+ function isJqError(error) {
22
+ return error instanceof Error && 'stderr' in error;
23
+ }
20
24
  //# sourceMappingURL=filtering.js.map
package/filtering.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"filtering.js","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":";;;;;AAGA,kCAMC;AATD,cAAc;AACd,oDAA4B;AAErB,KAAK,UAAU,WAAW,CAAC,QAA6B,EAAE,QAAa;IAC5E,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"}
1
+ {"version":3,"file":"filtering.js","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":";;;;;AAGA,kCAMC;AAMD,8BAEC;AAjBD,cAAc;AACd,oDAA4B;AAErB,KAAK,UAAU,WAAW,CAAC,QAA6B,EAAE,QAAa;IAC5E,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;AAED,SAAgB,SAAS,CAAC,KAAU;IAClC,OAAO,KAAK,YAAY,KAAK,IAAI,QAAQ,IAAI,KAAK,CAAC;AACrD,CAAC"}
package/filtering.mjs CHANGED
@@ -10,4 +10,7 @@ export async function maybeFilter(jqFilter, response) {
10
10
  async function jq(json, jqFilter) {
11
11
  return (await initJq).json(json, jqFilter);
12
12
  }
13
+ export function isJqError(error) {
14
+ return error instanceof Error && 'stderr' in error;
15
+ }
13
16
  //# sourceMappingURL=filtering.mjs.map
package/filtering.mjs.map CHANGED
@@ -1 +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,QAA6B,EAAE,QAAa;IAC5E,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"}
1
+ {"version":3,"file":"filtering.mjs","sourceRoot":"","sources":["src/filtering.ts"],"names":[],"mappings":"OACO,MAAM,MAAM,QAAQ;AAE3B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAA6B,EAAE,QAAa;IAC5E,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;AAED,MAAM,UAAU,SAAS,CAAC,KAAU;IAClC,OAAO,KAAK,YAAY,KAAK,IAAI,QAAQ,IAAI,KAAK,CAAC;AACrD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "profound-mcp",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "The official MCP Server for the Profound API",
5
5
  "author": "Profound <support@tryprofound.com>",
6
6
  "types": "./index.d.ts",
@@ -27,14 +27,14 @@
27
27
  "fix": "eslint --fix --ext ts,js ."
28
28
  },
29
29
  "dependencies": {
30
- "profoundai": "^0.10.0",
30
+ "profoundai": "^0.10.1",
31
31
  "@cloudflare/cabidela": "^0.2.4",
32
32
  "@modelcontextprotocol/sdk": "^1.11.5",
33
33
  "@valtown/deno-http-worker": "^0.0.21",
34
34
  "cors": "^2.8.5",
35
35
  "express": "^5.1.0",
36
36
  "fuse.js": "^7.1.0",
37
- "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz",
37
+ "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz",
38
38
  "qs": "^6.14.0",
39
39
  "typescript": "5.8.3",
40
40
  "yargs": "^17.7.2",
package/server.js CHANGED
@@ -22,7 +22,7 @@ var tools_2 = require("./tools.js");
22
22
  Object.defineProperty(exports, "endpoints", { enumerable: true, get: function () { return tools_2.endpoints; } });
23
23
  const newMcpServer = () => new mcp_js_1.McpServer({
24
24
  name: 'profoundai_api',
25
- version: '0.10.0',
25
+ version: '0.10.1',
26
26
  }, { capabilities: { tools: {}, logging: {} } });
27
27
  exports.newMcpServer = newMcpServer;
28
28
  // Create server instance
package/server.mjs CHANGED
@@ -11,7 +11,7 @@ export { ClientType } from "./compat.mjs";
11
11
  export { endpoints } from "./tools.mjs";
12
12
  export const newMcpServer = () => new McpServer({
13
13
  name: 'profoundai_api',
14
- version: '0.10.0',
14
+ version: '0.10.1',
15
15
  }, { capabilities: { tools: {}, logging: {} } });
16
16
  // Create server instance
17
17
  export const server = newMcpServer();
package/src/filtering.ts CHANGED
@@ -12,3 +12,7 @@ export async function maybeFilter(jqFilter: unknown | undefined, response: any):
12
12
  async function jq(json: any, jqFilter: string) {
13
13
  return (await initJq).json(json, jqFilter);
14
14
  }
15
+
16
+ export function isJqError(error: any): error is Error {
17
+ return error instanceof Error && 'stderr' in error;
18
+ }
package/src/server.ts CHANGED
@@ -34,7 +34,7 @@ export const newMcpServer = () =>
34
34
  new McpServer(
35
35
  {
36
36
  name: 'profoundai_api',
37
- version: '0.10.0',
37
+ version: '0.10.1',
38
38
  },
39
39
  { capabilities: { tools: {}, logging: {} } },
40
40
  );
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { maybeFilter } from 'profound-mcp/filtering';
4
- import { Metadata, asTextContentResult } from 'profound-mcp/tools/types';
3
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
4
+ import { Metadata, asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
5
5
 
6
6
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
7
  import Profound from 'profoundai';
@@ -38,7 +38,14 @@ export const tool: Tool = {
38
38
 
39
39
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
40
40
  const { jq_filter } = args as any;
41
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.list()));
41
+ try {
42
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.list()));
43
+ } catch (error) {
44
+ if (isJqError(error)) {
45
+ return asErrorResult(error.message);
46
+ }
47
+ throw error;
48
+ }
42
49
  };
43
50
 
44
51
  export default { metadata, tool, handler };
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { maybeFilter } from 'profound-mcp/filtering';
4
- import { Metadata, asTextContentResult } from 'profound-mcp/tools/types';
3
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
4
+ import { Metadata, asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
5
5
 
6
6
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
7
  import Profound from 'profoundai';
@@ -42,9 +42,16 @@ export const tool: Tool = {
42
42
 
43
43
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
44
44
  const { category_id, jq_filter, ...body } = args as any;
45
- return asTextContentResult(
46
- await maybeFilter(jq_filter, await client.organizations.categories.prompts(category_id)),
47
- );
45
+ try {
46
+ return asTextContentResult(
47
+ await maybeFilter(jq_filter, await client.organizations.categories.prompts(category_id)),
48
+ );
49
+ } catch (error) {
50
+ if (isJqError(error)) {
51
+ return asErrorResult(error.message);
52
+ }
53
+ throw error;
54
+ }
48
55
  };
49
56
 
50
57
  export default { metadata, tool, handler };
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { maybeFilter } from 'profound-mcp/filtering';
4
- import { Metadata, asTextContentResult } from 'profound-mcp/tools/types';
3
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
4
+ import { Metadata, asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
5
5
 
6
6
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
7
  import Profound from 'profoundai';
@@ -42,9 +42,16 @@ export const tool: Tool = {
42
42
 
43
43
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
44
44
  const { category_id, jq_filter, ...body } = args as any;
45
- return asTextContentResult(
46
- await maybeFilter(jq_filter, await client.organizations.categories.tags(category_id)),
47
- );
45
+ try {
46
+ return asTextContentResult(
47
+ await maybeFilter(jq_filter, await client.organizations.categories.tags(category_id)),
48
+ );
49
+ } catch (error) {
50
+ if (isJqError(error)) {
51
+ return asErrorResult(error.message);
52
+ }
53
+ throw error;
54
+ }
48
55
  };
49
56
 
50
57
  export default { metadata, tool, handler };
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { maybeFilter } from 'profound-mcp/filtering';
4
- import { Metadata, asTextContentResult } from 'profound-mcp/tools/types';
3
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
4
+ import { Metadata, asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
5
5
 
6
6
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
7
  import Profound from 'profoundai';
@@ -42,9 +42,16 @@ export const tool: Tool = {
42
42
 
43
43
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
44
44
  const { category_id, jq_filter, ...body } = args as any;
45
- return asTextContentResult(
46
- await maybeFilter(jq_filter, await client.organizations.categories.topics(category_id)),
47
- );
45
+ try {
46
+ return asTextContentResult(
47
+ await maybeFilter(jq_filter, await client.organizations.categories.topics(category_id)),
48
+ );
49
+ } catch (error) {
50
+ if (isJqError(error)) {
51
+ return asErrorResult(error.message);
52
+ }
53
+ throw error;
54
+ }
48
55
  };
49
56
 
50
57
  export default { metadata, tool, handler };
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { maybeFilter } from 'profound-mcp/filtering';
4
- import { Metadata, asTextContentResult } from 'profound-mcp/tools/types';
3
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
4
+ import { Metadata, asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
5
5
 
6
6
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
7
  import Profound from 'profoundai';
@@ -38,7 +38,14 @@ export const tool: Tool = {
38
38
 
39
39
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
40
40
  const { jq_filter } = args as any;
41
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.domains()));
41
+ try {
42
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.domains()));
43
+ } catch (error) {
44
+ if (isJqError(error)) {
45
+ return asErrorResult(error.message);
46
+ }
47
+ throw error;
48
+ }
42
49
  };
43
50
 
44
51
  export default { metadata, tool, handler };
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { maybeFilter } from 'profound-mcp/filtering';
4
- import { Metadata, asTextContentResult } from 'profound-mcp/tools/types';
3
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
4
+ import { Metadata, asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
5
5
 
6
6
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
7
  import Profound from 'profoundai';
@@ -38,7 +38,14 @@ export const tool: Tool = {
38
38
 
39
39
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
40
40
  const { jq_filter } = args as any;
41
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.models()));
41
+ try {
42
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.models()));
43
+ } catch (error) {
44
+ if (isJqError(error)) {
45
+ return asErrorResult(error.message);
46
+ }
47
+ throw error;
48
+ }
42
49
  };
43
50
 
44
51
  export default { metadata, tool, handler };
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { maybeFilter } from 'profound-mcp/filtering';
4
- import { Metadata, asTextContentResult } from 'profound-mcp/tools/types';
3
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
4
+ import { Metadata, asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
5
5
 
6
6
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
7
  import Profound from 'profoundai';
@@ -38,7 +38,14 @@ export const tool: Tool = {
38
38
 
39
39
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
40
40
  const { jq_filter } = args as any;
41
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.regions()));
41
+ try {
42
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.regions()));
43
+ } catch (error) {
44
+ if (isJqError(error)) {
45
+ return asErrorResult(error.message);
46
+ }
47
+ throw error;
48
+ }
42
49
  };
43
50
 
44
51
  export default { metadata, tool, handler };
@@ -87,6 +87,18 @@ export async function asBinaryContentResult(response: Response): Promise<ToolCal
87
87
  }
88
88
  }
89
89
 
90
+ export function asErrorResult(message: string): ToolCallResult {
91
+ return {
92
+ content: [
93
+ {
94
+ type: 'text',
95
+ text: message,
96
+ },
97
+ ],
98
+ isError: true,
99
+ };
100
+ }
101
+
90
102
  export type Metadata = {
91
103
  resource: string;
92
104
  operation: 'read' | 'write';
@@ -1 +1 @@
1
- {"version":3,"file":"list-organizations-categories.d.mts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/list-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
1
+ {"version":3,"file":"list-organizations-categories.d.mts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/list-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"list-organizations-categories.d.ts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/list-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
1
+ {"version":3,"file":"list-organizations-categories.d.ts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/list-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
@@ -32,7 +32,15 @@ exports.tool = {
32
32
  };
33
33
  const handler = async (client, args) => {
34
34
  const { jq_filter } = args;
35
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.categories.list()));
35
+ try {
36
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.categories.list()));
37
+ }
38
+ catch (error) {
39
+ if ((0, filtering_1.isJqError)(error)) {
40
+ return (0, types_1.asErrorResult)(error.message);
41
+ }
42
+ throw error;
43
+ }
36
44
  };
37
45
  exports.handler = handler;
38
46
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"list-organizations-categories.js","sourceRoot":"","sources":["../../../src/tools/organizations/categories/list-organizations-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAqD;AACrD,oDAAyE;AAK5D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,oBAAoB;IAC9B,WAAW,EAAE,sCAAsC;CACpD,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,myBAAmyB;IACryB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACzG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"list-organizations-categories.js","sourceRoot":"","sources":["../../../src/tools/organizations/categories/list-organizations-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAgE;AAChE,oDAAwF;AAK3E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,oBAAoB;IAC9B,WAAW,EAAE,sCAAsC;CACpD,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,myBAAmyB;IACryB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACzG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,OAAO,WAUlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from 'profound-mcp/filtering';
3
- import { asTextContentResult } from 'profound-mcp/tools/types';
2
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
3
+ import { asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
4
4
  export const metadata = {
5
5
  resource: 'organizations.categories',
6
6
  operation: 'read',
@@ -29,7 +29,15 @@ export const tool = {
29
29
  };
30
30
  export const handler = async (client, args) => {
31
31
  const { jq_filter } = args;
32
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.list()));
32
+ try {
33
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.list()));
34
+ }
35
+ catch (error) {
36
+ if (isJqError(error)) {
37
+ return asErrorResult(error.message);
38
+ }
39
+ throw error;
40
+ }
33
41
  };
34
42
  export default { metadata, tool, handler };
35
43
  //# sourceMappingURL=list-organizations-categories.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-organizations-categories.mjs","sourceRoot":"","sources":["../../../src/tools/organizations/categories/list-organizations-categories.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,mBAAmB,EAAE,MAAM,0BAA0B;AAKxE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,oBAAoB;IAC9B,WAAW,EAAE,sCAAsC;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,myBAAmyB;IACryB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACzG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"list-organizations-categories.mjs","sourceRoot":"","sources":["../../../src/tools/organizations/categories/list-organizations-categories.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB;OACxD,EAAY,aAAa,EAAE,mBAAmB,EAAE,MAAM,0BAA0B;AAKvF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,oBAAoB;IAC9B,WAAW,EAAE,sCAAsC;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,myBAAmyB;IACryB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,IAAI,CAAC;QACH,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACzG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prompts-organizations-categories.d.mts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/prompts-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAKxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOzF,wBAA2C"}
1
+ {"version":3,"file":"prompts-organizations-categories.d.mts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/prompts-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAYxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAZoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAczF,wBAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"prompts-organizations-categories.d.ts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/prompts-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAKxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOzF,wBAA2C"}
1
+ {"version":3,"file":"prompts-organizations-categories.d.ts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/prompts-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAYxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAZoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAczF,wBAA2C"}
@@ -36,7 +36,15 @@ exports.tool = {
36
36
  };
37
37
  const handler = async (client, args) => {
38
38
  const { category_id, jq_filter, ...body } = args;
39
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.categories.prompts(category_id)));
39
+ try {
40
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.categories.prompts(category_id)));
41
+ }
42
+ catch (error) {
43
+ if ((0, filtering_1.isJqError)(error)) {
44
+ return (0, types_1.asErrorResult)(error.message);
45
+ }
46
+ throw error;
47
+ }
40
48
  };
41
49
  exports.handler = handler;
42
50
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"prompts-organizations-categories.js","sourceRoot":"","sources":["../../../src/tools/organizations/categories/prompts-organizations-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAqD;AACrD,oDAAyE;AAK5D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,0CAA0C;IACpD,WAAW,EAAE,kEAAkE;CAChF,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kCAAkC;IACxC,WAAW,EACT,s1EAAs1E;IACx1E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CACzF,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"prompts-organizations-categories.js","sourceRoot":"","sources":["../../../src/tools/organizations/categories/prompts-organizations-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAgE;AAChE,oDAAwF;AAK3E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,0CAA0C;IACpD,WAAW,EAAE,kEAAkE;CAChF,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kCAAkC;IACxC,WAAW,EACT,s1EAAs1E;IACx1E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CACzF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,OAAO,WAYlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from 'profound-mcp/filtering';
3
- import { asTextContentResult } from 'profound-mcp/tools/types';
2
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
3
+ import { asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
4
4
  export const metadata = {
5
5
  resource: 'organizations.categories',
6
6
  operation: 'read',
@@ -33,7 +33,15 @@ export const tool = {
33
33
  };
34
34
  export const handler = async (client, args) => {
35
35
  const { category_id, jq_filter, ...body } = args;
36
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.prompts(category_id)));
36
+ try {
37
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.prompts(category_id)));
38
+ }
39
+ catch (error) {
40
+ if (isJqError(error)) {
41
+ return asErrorResult(error.message);
42
+ }
43
+ throw error;
44
+ }
37
45
  };
38
46
  export default { metadata, tool, handler };
39
47
  //# sourceMappingURL=prompts-organizations-categories.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts-organizations-categories.mjs","sourceRoot":"","sources":["../../../src/tools/organizations/categories/prompts-organizations-categories.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,mBAAmB,EAAE,MAAM,0BAA0B;AAKxE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,0CAA0C;IACpD,WAAW,EAAE,kEAAkE;CAChF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,kCAAkC;IACxC,WAAW,EACT,s1EAAs1E;IACx1E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,OAAO,mBAAmB,CACxB,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CACzF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"prompts-organizations-categories.mjs","sourceRoot":"","sources":["../../../src/tools/organizations/categories/prompts-organizations-categories.ts"],"names":[],"mappings":"AAAA,sFAA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;IACd,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tags-organizations-categories.d.mts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/tags-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAKxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOzF,wBAA2C"}
1
+ {"version":3,"file":"tags-organizations-categories.d.mts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/tags-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAYxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAZoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAczF,wBAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"tags-organizations-categories.d.ts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/tags-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAKxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOzF,wBAA2C"}
1
+ {"version":3,"file":"tags-organizations-categories.d.ts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/tags-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAYxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAZoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAczF,wBAA2C"}
@@ -36,7 +36,15 @@ exports.tool = {
36
36
  };
37
37
  const handler = async (client, args) => {
38
38
  const { category_id, jq_filter, ...body } = args;
39
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.categories.tags(category_id)));
39
+ try {
40
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.categories.tags(category_id)));
41
+ }
42
+ catch (error) {
43
+ if ((0, filtering_1.isJqError)(error)) {
44
+ return (0, types_1.asErrorResult)(error.message);
45
+ }
46
+ throw error;
47
+ }
40
48
  };
41
49
  exports.handler = handler;
42
50
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"tags-organizations-categories.js","sourceRoot":"","sources":["../../../src/tools/organizations/categories/tags-organizations-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAqD;AACrD,oDAAyE;AAK5D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,uCAAuC;IACjD,WAAW,EAAE,4DAA4D;CAC1E,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,20BAA20B;IAC70B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CACtF,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"tags-organizations-categories.js","sourceRoot":"","sources":["../../../src/tools/organizations/categories/tags-organizations-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAgE;AAChE,oDAAwF;AAK3E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,uCAAuC;IACjD,WAAW,EAAE,4DAA4D;CAC1E,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,20BAA20B;IAC70B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CACtF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,OAAO,WAYlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from 'profound-mcp/filtering';
3
- import { asTextContentResult } from 'profound-mcp/tools/types';
2
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
3
+ import { asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
4
4
  export const metadata = {
5
5
  resource: 'organizations.categories',
6
6
  operation: 'read',
@@ -33,7 +33,15 @@ export const tool = {
33
33
  };
34
34
  export const handler = async (client, args) => {
35
35
  const { category_id, jq_filter, ...body } = args;
36
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.tags(category_id)));
36
+ try {
37
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.tags(category_id)));
38
+ }
39
+ catch (error) {
40
+ if (isJqError(error)) {
41
+ return asErrorResult(error.message);
42
+ }
43
+ throw error;
44
+ }
37
45
  };
38
46
  export default { metadata, tool, handler };
39
47
  //# sourceMappingURL=tags-organizations-categories.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tags-organizations-categories.mjs","sourceRoot":"","sources":["../../../src/tools/organizations/categories/tags-organizations-categories.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,mBAAmB,EAAE,MAAM,0BAA0B;AAKxE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,uCAAuC;IACjD,WAAW,EAAE,4DAA4D;CAC1E,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,20BAA20B;IAC70B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,OAAO,mBAAmB,CACxB,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CACtF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"tags-organizations-categories.mjs","sourceRoot":"","sources":["../../../src/tools/organizations/categories/tags-organizations-categories.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB;OACxD,EAAY,aAAa,EA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,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"topics-organizations-categories.d.mts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/topics-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAKxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOzF,wBAA2C"}
1
+ {"version":3,"file":"topics-organizations-categories.d.mts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/topics-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAYxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAZoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAczF,wBAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"topics-organizations-categories.d.ts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/topics-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAKxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOzF,wBAA2C"}
1
+ {"version":3,"file":"topics-organizations-categories.d.ts","sourceRoot":"","sources":["../../../src/tools/organizations/categories/topics-organizations-categories.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAYxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAZoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAczF,wBAA2C"}
@@ -36,7 +36,15 @@ exports.tool = {
36
36
  };
37
37
  const handler = async (client, args) => {
38
38
  const { category_id, jq_filter, ...body } = args;
39
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.categories.topics(category_id)));
39
+ try {
40
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.categories.topics(category_id)));
41
+ }
42
+ catch (error) {
43
+ if ((0, filtering_1.isJqError)(error)) {
44
+ return (0, types_1.asErrorResult)(error.message);
45
+ }
46
+ throw error;
47
+ }
40
48
  };
41
49
  exports.handler = handler;
42
50
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"topics-organizations-categories.js","sourceRoot":"","sources":["../../../src/tools/organizations/categories/topics-organizations-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAqD;AACrD,oDAAyE;AAK5D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,yCAAyC;IACnD,WAAW,EAAE,gEAAgE;CAC9E,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,iCAAiC;IACvC,WAAW,EACT,i0BAAi0B;IACn0B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CACxF,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"topics-organizations-categories.js","sourceRoot":"","sources":["../../../src/tools/organizations/categories/topics-organizations-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAgE;AAChE,oDAAwF;AAK3E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,yCAAyC;IACnD,WAAW,EAAE,gEAAgE;CAC9E,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,iCAAiC;IACvC,WAAW,EACT,i0BAAi0B;IACn0B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CACxF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,OAAO,WAYlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from 'profound-mcp/filtering';
3
- import { asTextContentResult } from 'profound-mcp/tools/types';
2
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
3
+ import { asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
4
4
  export const metadata = {
5
5
  resource: 'organizations.categories',
6
6
  operation: 'read',
@@ -33,7 +33,15 @@ export const tool = {
33
33
  };
34
34
  export const handler = async (client, args) => {
35
35
  const { category_id, jq_filter, ...body } = args;
36
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.topics(category_id)));
36
+ try {
37
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.categories.topics(category_id)));
38
+ }
39
+ catch (error) {
40
+ if (isJqError(error)) {
41
+ return asErrorResult(error.message);
42
+ }
43
+ throw error;
44
+ }
37
45
  };
38
46
  export default { metadata, tool, handler };
39
47
  //# sourceMappingURL=topics-organizations-categories.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"topics-organizations-categories.mjs","sourceRoot":"","sources":["../../../src/tools/organizations/categories/topics-organizations-categories.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,mBAAmB,EAAE,MAAM,0BAA0B;AAKxE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,yCAAyC;IACnD,WAAW,EAAE,gEAAgE;CAC9E,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,iCAAiC;IACvC,WAAW,EACT,i0BAAi0B;IACn0B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;aACrB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxD,OAAO,mBAAmB,CACxB,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CACxF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"topics-organizations-categories.mjs","sourceRoot":"","sources":["../../../src/tools/organizations/categories/topics-organizations-categories.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB;OACxD,EAAY,aAAa,EAAE,mBAAmB,EAAE,MAAM,0BAA0B;AAKvF,MAAM,CAAC,MAAM,QAAQ,GAAa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":"","sources":["../../src/tools/organizations/domains-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
1
+ {"version":3,"file":"domains-organizations.d.mts","sourceRoot":"","sources":["../../src/tools/organizations/domains-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"domains-organizations.d.ts","sourceRoot":"","sources":["../../src/tools/organizations/domains-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
1
+ {"version":3,"file":"domains-organizations.d.ts","sourceRoot":"","sources":["../../src/tools/organizations/domains-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
@@ -32,7 +32,15 @@ exports.tool = {
32
32
  };
33
33
  const handler = async (client, args) => {
34
34
  const { jq_filter } = args;
35
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.domains()));
35
+ try {
36
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.domains()));
37
+ }
38
+ catch (error) {
39
+ if ((0, filtering_1.isJqError)(error)) {
40
+ return (0, types_1.asErrorResult)(error.message);
41
+ }
42
+ throw error;
43
+ }
36
44
  };
37
45
  exports.handler = handler;
38
46
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"domains-organizations.js","sourceRoot":"","sources":["../../src/tools/organizations/domains-organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAqD;AACrD,oDAAyE;AAK5D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,gCAAgC;CAC9C,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,46BAA46B;IAC96B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"domains-organizations.js","sourceRoot":"","sources":["../../src/tools/organizations/domains-organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAgE;AAChE,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cp/filtering';
3
- import { asTextContentResult } from 'profound-mcp/tools/types';
2
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
3
+ import { asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
4
4
  export const metadata = {
5
5
  resource: 'organizations',
6
6
  operation: 'read',
@@ -29,7 +29,15 @@ export const tool = {
29
29
  };
30
30
  export const handler = async (client, args) => {
31
31
  const { jq_filter } = args;
32
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.domains()));
32
+ try {
33
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.domains()));
34
+ }
35
+ catch (error) {
36
+ if (isJqError(error)) {
37
+ return asErrorResult(error.message);
38
+ }
39
+ throw error;
40
+ }
33
41
  };
34
42
  export default { metadata, tool, handler };
35
43
  //# sourceMappingURL=domains-organizations.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"domains-organizations.mjs","sourceRoot":"","sources":["../../src/tools/organizations/domains-organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,mBAAmB,EAAE,MAAM,0BAA0B;AAKxE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,gCAAgC;CAC9C,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,46BAA46B;IAC96B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"domains-organizations.mjs","sourceRoot":"","sources":["../../src/tools/organizations/domains-organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB;OACxD,EAAY,aAAa,EAAE,mBAAmB,EAAE,MAAM,0BAA0B;AAKvF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,gCAAgC;CAC9C,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,46BAA46B;IAC96B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,IAAI,CAAC;QACH,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACjG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"models-organizations.d.mts","sourceRoot":"","sources":["../../src/tools/organizations/models-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
1
+ {"version":3,"file":"models-organizations.d.mts","sourceRoot":"","sources":["../../src/tools/organizations/models-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"models-organizations.d.ts","sourceRoot":"","sources":["../../src/tools/organizations/models-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
1
+ {"version":3,"file":"models-organizations.d.ts","sourceRoot":"","sources":["../../src/tools/organizations/models-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
@@ -32,7 +32,15 @@ exports.tool = {
32
32
  };
33
33
  const handler = async (client, args) => {
34
34
  const { jq_filter } = args;
35
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.models()));
35
+ try {
36
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.models()));
37
+ }
38
+ catch (error) {
39
+ if ((0, filtering_1.isJqError)(error)) {
40
+ return (0, types_1.asErrorResult)(error.message);
41
+ }
42
+ throw error;
43
+ }
36
44
  };
37
45
  exports.handler = handler;
38
46
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"models-organizations.js","sourceRoot":"","sources":["../../src/tools/organizations/models-organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAqD;AACrD,oDAAyE;AAK5D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,gBAAgB;IAC1B,WAAW,EAAE,8BAA8B;CAC5C,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,myBAAmyB;IACryB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAChG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"models-organizations.js","sourceRoot":"","sources":["../../src/tools/organizations/models-organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAgE;AAChE,oDAAwF;AAK3E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,gBAAgB;IAC1B,WAAW,EAAE,8BAA8B;CAC5C,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,myBAAmyB;IACryB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAChG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,OAAO,WAUlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from 'profound-mcp/filtering';
3
- import { asTextContentResult } from 'profound-mcp/tools/types';
2
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
3
+ import { asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
4
4
  export const metadata = {
5
5
  resource: 'organizations',
6
6
  operation: 'read',
@@ -29,7 +29,15 @@ export const tool = {
29
29
  };
30
30
  export const handler = async (client, args) => {
31
31
  const { jq_filter } = args;
32
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.models()));
32
+ try {
33
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.models()));
34
+ }
35
+ catch (error) {
36
+ if (isJqError(error)) {
37
+ return asErrorResult(error.message);
38
+ }
39
+ throw error;
40
+ }
33
41
  };
34
42
  export default { metadata, tool, handler };
35
43
  //# sourceMappingURL=models-organizations.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"models-organizations.mjs","sourceRoot":"","sources":["../../src/tools/organizations/models-organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,mBAAmB,EAAE,MAAM,0BAA0B;AAKxE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,gBAAgB;IAC1B,WAAW,EAAE,8BAA8B;CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,myBAAmyB;IACryB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAChG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"models-organizations.mjs","sourceRoot":"","sources":["../../src/tools/organizations/models-organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB;OACxD,EAAY,aAAa,EAAE,mBAAmB,EAAE,MAAM,0BAA0B;AAKvF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,gBAAgB;IAC1B,WAAW,EAAE,8BAA8B;CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,myBAAmyB;IACryB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,IAAI,CAAC;QACH,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAChG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"regions-organizations.d.mts","sourceRoot":"","sources":["../../src/tools/organizations/regions-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
1
+ {"version":3,"file":"regions-organizations.d.mts","sourceRoot":"","sources":["../../src/tools/organizations/regions-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"regions-organizations.d.ts","sourceRoot":"","sources":["../../src/tools/organizations/regions-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
1
+ {"version":3,"file":"regions-organizations.d.ts","sourceRoot":"","sources":["../../src/tools/organizations/regions-organizations.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
@@ -32,7 +32,15 @@ exports.tool = {
32
32
  };
33
33
  const handler = async (client, args) => {
34
34
  const { jq_filter } = args;
35
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.regions()));
35
+ try {
36
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.organizations.regions()));
37
+ }
38
+ catch (error) {
39
+ if ((0, filtering_1.isJqError)(error)) {
40
+ return (0, types_1.asErrorResult)(error.message);
41
+ }
42
+ throw error;
43
+ }
36
44
  };
37
45
  exports.handler = handler;
38
46
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"regions-organizations.js","sourceRoot":"","sources":["../../src/tools/organizations/regions-organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAqD;AACrD,oDAAyE;AAK5D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,gCAAgC;CAC9C,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,wyBAAwyB;IAC1yB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"regions-organizations.js","sourceRoot":"","sources":["../../src/tools/organizations/regions-organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAgE;AAChE,oDAAwF;AAK3E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,gCAAgC;CAC9C,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,wyBAAwyB;IAC1yB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACjG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,OAAO,WAUlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from 'profound-mcp/filtering';
3
- import { asTextContentResult } from 'profound-mcp/tools/types';
2
+ import { isJqError, maybeFilter } from 'profound-mcp/filtering';
3
+ import { asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
4
4
  export const metadata = {
5
5
  resource: 'organizations',
6
6
  operation: 'read',
@@ -29,7 +29,15 @@ export const tool = {
29
29
  };
30
30
  export const handler = async (client, args) => {
31
31
  const { jq_filter } = args;
32
- return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.regions()));
32
+ try {
33
+ return asTextContentResult(await maybeFilter(jq_filter, await client.organizations.regions()));
34
+ }
35
+ catch (error) {
36
+ if (isJqError(error)) {
37
+ return asErrorResult(error.message);
38
+ }
39
+ throw error;
40
+ }
33
41
  };
34
42
  export default { metadata, tool, handler };
35
43
  //# sourceMappingURL=regions-organizations.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"regions-organizations.mjs","sourceRoot":"","sources":["../../src/tools/organizations/regions-organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,mBAAmB,EAAE,MAAM,0BAA0B;AAKxE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,gCAAgC;CAC9C,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,wyBAAwyB;IAC1yB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAW,CAAC;IAClC,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"regions-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AI,EAAE,OAAO,EAAE,CAAC"}
package/tools/types.d.mts CHANGED
@@ -34,6 +34,7 @@ export type ToolCallResult = {
34
34
  export type HandlerFunction = (client: Profound, args: Record<string, unknown> | undefined) => Promise<ToolCallResult>;
35
35
  export declare function asTextContentResult(result: unknown): ToolCallResult;
36
36
  export declare function asBinaryContentResult(response: Response): Promise<ToolCallResult>;
37
+ export declare function asErrorResult(message: string): ToolCallResult;
37
38
  export type Metadata = {
38
39
  resource: string;
39
40
  operation: 'read' | 'write';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/tools/types.ts"],"names":[],"mappings":"OAEO,QAAQ,MAAM,YAAY;OAC1B,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EACJ;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,GACD;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACP,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAE3G,MAAM,MAAM,cAAc,GAAG;IAC3B,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AC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC"}
package/tools/types.d.ts CHANGED
@@ -34,6 +34,7 @@ export type ToolCallResult = {
34
34
  export type HandlerFunction = (client: Profound, args: Record<string, unknown> | undefined) => Promise<ToolCallResult>;
35
35
  export declare function asTextContentResult(result: unknown): ToolCallResult;
36
36
  export declare function asBinaryContentResult(response: Response): Promise<ToolCallResult>;
37
+ export declare function asErrorResult(message: string): ToolCallResult;
37
38
  export type Metadata = {
38
39
  resource: string;
39
40
  operation: 'read' | 'write';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/tools/types.ts"],"names":[],"mappings":"OAEO,QAAQ,MAAM,YAAY;OAC1B,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EACJ;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,GACD;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACP,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,oBAA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MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC"}
package/tools/types.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.asTextContentResult = asTextContentResult;
5
5
  exports.asBinaryContentResult = asBinaryContentResult;
6
+ exports.asErrorResult = asErrorResult;
6
7
  function asTextContentResult(result) {
7
8
  return {
8
9
  content: [
@@ -43,4 +44,15 @@ async function asBinaryContentResult(response) {
43
44
  };
44
45
  }
45
46
  }
47
+ function asErrorResult(message) {
48
+ return {
49
+ content: [
50
+ {
51
+ type: 'text',
52
+ text: message,
53
+ },
54
+ ],
55
+ isError: true,
56
+ };
57
+ }
46
58
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/tools/types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAiDtF,kDASC;AAED,sDA2BC;AAtCD,SAAgB,mBAAmB,CAAC,MAAe;IACjD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAAC,QAAkB;IAC5D,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtE,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO;YACL,OAAO,EAAE,CAAC,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EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE;wBACR,uEAAuE;wBACvE,GAAG,EAAE,0BAA0B;wBAC/B,QAAQ;wBACR,IAAI,EAAE,IAAI;qBACX;iBACF;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,OAAO;aACd;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
package/tools/types.mjs CHANGED
@@ -39,4 +39,15 @@ export async function asBinaryContentResult(response) {
39
39
  };
40
40
  }
41
41
  }
42
+ export function asErrorResult(message) {
43
+ return {
44
+ content: [
45
+ {
46
+ type: 'text',
47
+ text: message,
48
+ },
49
+ ],
50
+ isError: true,
51
+ };
52
+ }
42
53
  //# sourceMappingURL=types.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/tools/types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAiDtF,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,QAAkB;IAC5D,MAAM,IAAI,GA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