@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/mcp/index.js
CHANGED
|
@@ -144,6 +144,7 @@
|
|
|
144
144
|
$itemId: ID!
|
|
145
145
|
$columnValues: JSON!
|
|
146
146
|
$createLabelsIfMissing: Boolean
|
|
147
|
+
$columnIds: [String!]
|
|
147
148
|
) {
|
|
148
149
|
change_multiple_column_values(
|
|
149
150
|
board_id: $boardId
|
|
@@ -154,6 +155,10 @@
|
|
|
154
155
|
id
|
|
155
156
|
name
|
|
156
157
|
url
|
|
158
|
+
column_values(ids: $columnIds) {
|
|
159
|
+
id
|
|
160
|
+
value
|
|
161
|
+
}
|
|
157
162
|
}
|
|
158
163
|
}
|
|
159
164
|
`,Hm=Lm`
|
|
@@ -477,7 +482,7 @@
|
|
|
477
482
|
name
|
|
478
483
|
}
|
|
479
484
|
}
|
|
480
|
-
`,iu={query:e.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:e.z.string().describe("JSON string containing the variables for the GraphQL operation")};class ru extends $r{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=Qi.ALL_API,this.annotations=Pr({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 iu}async loadSchema(e){if(ru.schemaCache[e])return ru.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Jm),{data:a}=t,i=Ud(a);return ru.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 Fd(await this.loadSchema(t),new Rn(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??dr);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}}}}ru.schemaCache={};const nu={itemId:e.z.number().describe("The ID of the item to be updated"),columnValues:e.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:e.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.")},ou={boardId:e.z.number().describe("The ID of the board that contains the item to be updated"),...nu};class su extends $r{constructor(){super(...arguments),this.name="change_item_column_values",this.type=Qi.WRITE,this.annotations=Pr({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?nu:ou}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}}
|
|
485
|
+
`,iu={query:e.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:e.z.string().describe("JSON string containing the variables for the GraphQL operation")};class ru extends $r{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=Qi.ALL_API,this.annotations=Pr({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 iu}async loadSchema(e){if(ru.schemaCache[e])return ru.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Jm),{data:a}=t,i=Ud(a);return ru.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 Fd(await this.loadSchema(t),new Rn(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??dr);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}}}}ru.schemaCache={};const nu={itemId:e.z.number().describe("The ID of the item to be updated"),columnValues:e.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:e.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.")},ou={boardId:e.z.number().describe("The ID of the board that contains the item to be updated"),...nu};class su extends $r{constructor(){super(...arguments),this.name="change_item_column_values",this.type=Qi.WRITE,this.annotations=Pr({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?nu:ou}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(qm,{...t,columnIds:a}),r=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:r}}}}const du=Lm`
|
|
481
486
|
query GetObjectSchemas($ids: [ID!], $names: [String!], $limit: Int, $page: Int, $excludeCreatedByMonday: Boolean) {
|
|
482
487
|
get_object_schemas(ids: $ids, names: $names, limit: $limit, page: $page, exclude_created_by_monday: $excludeCreatedByMonday) {
|
|
483
488
|
id
|