@mondaydotcomorg/agent-toolkit 5.7.1 → 5.8.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/dist/cjs/core/index.js +13 -3
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.js +13 -3
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.js +13 -3
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.js +13 -3
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.js +13 -3
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.js +13 -3
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/core/index.js
CHANGED
|
@@ -135,8 +135,18 @@
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
`,yp=cp`
|
|
138
|
-
mutation changeItemColumnValues(
|
|
139
|
-
|
|
138
|
+
mutation changeItemColumnValues(
|
|
139
|
+
$boardId: ID!
|
|
140
|
+
$itemId: ID!
|
|
141
|
+
$columnValues: JSON!
|
|
142
|
+
$createLabelsIfMissing: Boolean
|
|
143
|
+
) {
|
|
144
|
+
change_multiple_column_values(
|
|
145
|
+
board_id: $boardId
|
|
146
|
+
item_id: $itemId
|
|
147
|
+
column_values: $columnValues
|
|
148
|
+
create_labels_if_missing: $createLabelsIfMissing
|
|
149
|
+
) {
|
|
140
150
|
id
|
|
141
151
|
name
|
|
142
152
|
url
|
|
@@ -432,7 +442,7 @@
|
|
|
432
442
|
name
|
|
433
443
|
}
|
|
434
444
|
}
|
|
435
|
-
`,xp={query:n.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:n.z.string().describe("JSON string containing the variables for the GraphQL operation")};class Cp extends ce{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=exports.ToolType.ALL_API,this.annotations=me({title:"Run Query or Mutation on any monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute any monday.com API operation by generating GraphQL queries and mutations dynamically. Make sure you ask only for the fields you need and nothing more. When providing the query/mutation - use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}getInputSchema(){return xp}async loadSchema(e){if(Cp.schemaCache[e])return Cp.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Sp),{data:a}=t,i=fn(a);return Cp.schemaCache[e]=i,i}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,t){var a;return hn(await this.loadSchema(t),new pt(e,a).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;try{let e={};try{e=JSON.parse(a)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const i=await this.validateOperation(t,this.context?.apiVersion??j);if(i.length>0)return{content:i.join(", ")};return{content:await this.mondayApi.request(t,e)}}catch(e){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)return{content:t.response.errors.map((e=>e.message)).join(", ")}}return{content:t}}}}Cp.schemaCache={};const Rp={itemId:n.z.number().describe("The ID of the item to be updated"),columnValues:n.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"')},Lp={boardId:n.z.number().describe("The ID of the board that contains the item to be updated"),...Rp};class Vp extends ce{constructor(){super(...arguments),this.name="change_item_column_values",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of an item in a monday.com board. [REQUIRED PRECONDITION]: For board-relation linking tasks, call link_board_items_workflow before using this tool."}getInputSchema(){return this.context?.boardId?Rp:Lp}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},a=await this.mondayApi.request(yp,t);return{content:{message:`Item ${a.change_multiple_column_values?.id} successfully updated`,item_id:a.change_multiple_column_values?.id,item_name:a.change_multiple_column_values?.name,item_url:a.change_multiple_column_values?.url}}}}const Fp=cp`
|
|
445
|
+
`,xp={query:n.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:n.z.string().describe("JSON string containing the variables for the GraphQL operation")};class Cp extends ce{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=exports.ToolType.ALL_API,this.annotations=me({title:"Run Query or Mutation on any monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute any monday.com API operation by generating GraphQL queries and mutations dynamically. Make sure you ask only for the fields you need and nothing more. When providing the query/mutation - use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}getInputSchema(){return xp}async loadSchema(e){if(Cp.schemaCache[e])return Cp.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Sp),{data:a}=t,i=fn(a);return Cp.schemaCache[e]=i,i}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,t){var a;return hn(await this.loadSchema(t),new pt(e,a).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;try{let e={};try{e=JSON.parse(a)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const i=await this.validateOperation(t,this.context?.apiVersion??j);if(i.length>0)return{content:i.join(", ")};return{content:await this.mondayApi.request(t,e)}}catch(e){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)return{content:t.response.errors.map((e=>e.message)).join(", ")}}return{content:t}}}}Cp.schemaCache={};const Rp={itemId:n.z.number().describe("The ID of the item to be updated"),columnValues:n.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),createLabelsIfMissing:n.z.boolean().optional().describe("If true, create missing Status/Dropdown labels when setting those columns. Requires permission to change board structure. Omit or false to only use existing labels.")},Lp={boardId:n.z.number().describe("The ID of the board that contains the item to be updated"),...Rp};class Vp extends ce{constructor(){super(...arguments),this.name="change_item_column_values",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of an item in a monday.com board. [REQUIRED PRECONDITION]: For board-relation linking tasks, call link_board_items_workflow before using this tool."}getInputSchema(){return this.context?.boardId?Rp:Lp}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues,...void 0!==e.createLabelsIfMissing&&{createLabelsIfMissing:e.createLabelsIfMissing}},a=await this.mondayApi.request(yp,t);return{content:{message:`Item ${a.change_multiple_column_values?.id} successfully updated`,item_id:a.change_multiple_column_values?.id,item_name:a.change_multiple_column_values?.name,item_url:a.change_multiple_column_values?.url}}}}const Fp=cp`
|
|
436
446
|
query GetObjectSchemas($ids: [ID!], $names: [String!], $limit: Int, $page: Int, $excludeCreatedByMonday: Boolean) {
|
|
437
447
|
get_object_schemas(ids: $ids, names: $names, limit: $limit, page: $page, exclude_created_by_monday: $excludeCreatedByMonday) {
|
|
438
448
|
id
|