feat(agent-toolkit): add use_template and check_template_status tools#367
Open
koch-tom wants to merge 4 commits into
Open
feat(agent-toolkit): add use_template and check_template_status tools#367koch-tom wants to merge 4 commits into
koch-tom wants to merge 4 commits into
Conversation
…with tests - Implemented CheckTemplateStatusTool to check the status of a use_template operation, including handling various status responses (COMPLETE, FAILED, IN_PROGRESS, PENDING). - Added UseTemplateTool to apply a template and return a process ID for tracking. - Created unit tests for both tools to ensure correct functionality and response handling. - Updated GraphQL queries to support the new tools and added necessary types in the generated schema.
- Revert accidental prettier reformat of changeItemColumnValues query
- Make all check_template_status branches return consistent structured
content { status, board_ids, board_ids_map, message } so agents never
need to branch on typeof content
- Fix poll-stop condition: description and return message now explicitly
say to stop on FAILED (not just COMPLETE), preventing infinite polling
on failed jobs
- Add ~5 min give-up hint to description and return message
- Fix "in_progress" → "in progress" in status message
- Add PENDING test case and undefined process_id test case
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
naorsolomon
approved these changes
May 31, 2026
| templateId: z.coerce.number().int().positive().describe('The template ID to apply.'), | ||
| destinationWorkspaceId: z.coerce.number().int().positive().optional().describe('Target workspace ID.'), | ||
| destinationName: z.string().optional().describe('Name for the created instance or folder.'), | ||
| boardKind: z |
Collaborator
There was a problem hiding this comment.
what is this? if user installs workspace template what does it mean?
…on_status Aligns with the rename on the dapulse side (DaPulse/dapulse#110411). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
use_templatetool to apply a monday.com template asynchronously, returning aprocess_idimmediatelycheck_template_statustool to poll the operation status untilCOMPLETE, returning structured output includingboard_idsandboard_ids_mapuse_template_statusquery and supporting types (UseTemplateStatusenum,UseTemplateStatusType) toschema.graphql— depends on theuse_template_statusquery added inDevelopment/dapulseKey design decisions
templateId/destinationWorkspaceIdusez.coerce.number().int().positive()so the MCP layer rejects non-numeric input before the tool is called (avoids silentNaN → nullAPI errors)boardKindis optional with no default, letting the API use its server-side defaultcheck_template_statusreturns structured content{ status, board_ids, board_ids_map }onCOMPLETEso agents can use the source→destination board mapping directlyis_complete/is_failedremoved from the polling query (redundant withstatus);board_ids_mapis now surfaced in the responseTest plan
use_templatepasses numeric IDs directly to the mutation (noparseInt)templateId: 'abc'/''/0via Zod validationboardKindisundefinedin variables when omittedcheck_template_statusreturns structured{ board_ids, board_ids_map }on COMPLETEcheck_template_statusreturns explicit "Unexpected status" message for unknown status valuesnpm test)🤖 Generated with Claude Code