@mondaydotcomorg/agent-toolkit 5.22.1 → 5.23.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 +6 -1
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.js +6 -1
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.js +6 -1
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.js +6 -1
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.js +6 -1
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.js +6 -1
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/core/index.js
CHANGED
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
$itemId: ID!
|
|
144
144
|
$columnValues: JSON!
|
|
145
145
|
$createLabelsIfMissing: Boolean
|
|
146
|
+
$columnIds: [String!]
|
|
146
147
|
) {
|
|
147
148
|
change_multiple_column_values(
|
|
148
149
|
board_id: $boardId
|
|
@@ -153,6 +154,10 @@
|
|
|
153
154
|
id
|
|
154
155
|
name
|
|
155
156
|
url
|
|
157
|
+
column_values(ids: $columnIds) {
|
|
158
|
+
id
|
|
159
|
+
value
|
|
160
|
+
}
|
|
156
161
|
}
|
|
157
162
|
}
|
|
158
163
|
`,Es=fs`
|
|
@@ -476,7 +481,7 @@
|
|
|
476
481
|
name
|
|
477
482
|
}
|
|
478
483
|
}
|
|
479
|
-
`,Us={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 Ps extends me{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=exports.ToolType.ALL_API,this.annotations=ce({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 Us}async loadSchema(e){if(Ps.schemaCache[e])return Ps.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Os),{data:a}=t,i=fn(a);return Ps.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 st(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??M);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}}}}Ps.schemaCache={};const Fs={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.")},Vs={boardId:n.z.number().describe("The ID of the board that contains the item to be updated"),...Fs};class Ms extends me{constructor(){super(...arguments),this.name="change_item_column_values",this.type=exports.ToolType.WRITE,this.annotations=ce({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?Fs:Vs}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}}
|
|
484
|
+
`,Us={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 Ps extends me{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=exports.ToolType.ALL_API,this.annotations=ce({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 Us}async loadSchema(e){if(Ps.schemaCache[e])return Ps.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Os),{data:a}=t,i=fn(a);return Ps.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 st(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??M);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}}}}Ps.schemaCache={};const Fs={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.")},Vs={boardId:n.z.number().describe("The ID of the board that contains the item to be updated"),...Fs};class Ms extends me{constructor(){super(...arguments),this.name="change_item_column_values",this.type=exports.ToolType.WRITE,this.annotations=ce({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?Fs:Vs}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}};let a;try{a=Object.keys(JSON.parse(e.columnValues))}catch(e){throw new Error(`Invalid columnValues JSON: ${e.message}`)}const i=await this.mondayApi.request(Is,{...t,columnIds:a}),n=i.change_multiple_column_values?.column_values?.reduce(((e,t)=>(e[t.id]=t.value??null,e)),{});return{content:{message:`Item ${i.change_multiple_column_values?.id} successfully updated`,item_id:i.change_multiple_column_values?.id,item_name:i.change_multiple_column_values?.name,item_url:i.change_multiple_column_values?.url,column_values:n}}}}const Bs=fs`
|
|
480
485
|
query GetObjectSchemas($ids: [ID!], $names: [String!], $limit: Int, $page: Int, $excludeCreatedByMonday: Boolean) {
|
|
481
486
|
get_object_schemas(ids: $ids, names: $names, limit: $limit, page: $page, exclude_created_by_monday: $excludeCreatedByMonday) {
|
|
482
487
|
id
|