set_field_value
Assign or update field values for GitHub project items, supporting TEXT, NUMBER, DATE, SINGLE_SELECT, ITERATION, MILESTONE, ASSIGNEES, and LABELS, ensuring precise project data management.
Instructions
Set a field value for a GitHub project item. Supports all field types: TEXT, NUMBER, DATE, SINGLE_SELECT, ITERATION, MILESTONE, ASSIGNEES, LABELS
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fieldId | Yes | ||
| itemId | Yes | ||
| projectId | Yes | ||
| value | Yes |
Implementation Reference
- Core handler function that implements set_field_value tool logic. Queries field type and executes appropriate GraphQL mutation to update project item field value (supports TEXT, NUMBER, DATE, SINGLE_SELECT, ITERATION, MILESTONE, ASSIGNEES, LABELS).async setFieldValue(data: { projectId: string; itemId: string; fieldId: string; value: any; }): Promise<{ success: boolean; message: string }> { try { // First, get the field details to determine its type const fieldQuery = ` query($projectId: ID!, $fieldId: ID!) { node(id: $projectId) { ... on ProjectV2 { field(id: $fieldId) { ... on ProjectV2Field { id name dataType } ... on ProjectV2IterationField { id name dataType } ... on ProjectV2SingleSelectField { id name dataType options { id name } } ... on ProjectV2MilestoneField { id name dataType } ... on ProjectV2AssigneesField { id name dataType } ... on ProjectV2LabelsField { id name dataType } } } } } `; interface FieldQueryResponse { node: { field: { id: string; name: string; dataType: string; options?: Array<{ id: string; name: string }>; } } } const fieldResponse = await this.factory.graphql<FieldQueryResponse>(fieldQuery, { projectId: data.projectId, fieldId: data.fieldId }); if (!fieldResponse.node?.field) { throw new ResourceNotFoundError(ResourceType.FIELD, data.fieldId); } const field = fieldResponse.node.field; let mutation = ''; let variables: Record<string, any> = { projectId: data.projectId, itemId: data.itemId, fieldId: data.fieldId, }; // Determine the correct mutation based on field type switch (field.dataType) { case 'TEXT': mutation = ` mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $text: String!) { updateProjectV2ItemFieldValue(input: { projectId: $projectId itemId: $itemId fieldId: $fieldId value: { text: $text } }) { projectV2Item { id } } } `; variables.text = String(data.value); break; case 'NUMBER': mutation = ` mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $number: Float!) { updateProjectV2ItemFieldValue(input: { projectId: $projectId itemId: $itemId fieldId: $fieldId value: { number: $number } }) { projectV2Item { id } } } `; variables.number = Number(data.value); break; case 'DATE': mutation = ` mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $date: Date!) { updateProjectV2ItemFieldValue(input: { projectId: $projectId itemId: $itemId fieldId: $fieldId value: { date: $date } }) { projectV2Item { id } } } `; variables.date = String(data.value); break; case 'SINGLE_SELECT': // For single select, we need to find the option ID that matches the provided value const optionId = field.options?.find(opt => opt.name === data.value)?.id; if (!optionId) { throw new ValidationError(`Invalid option value '${data.value}' for field '${field.name}'`); } mutation = ` mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) { updateProjectV2ItemFieldValue(input: { projectId: $projectId itemId: $itemId fieldId: $fieldId value: { singleSelectOptionId: $optionId } }) { projectV2Item { id } } } `; variables.optionId = optionId; break; case 'ITERATION': // For iteration fields, the value should be an iteration ID if (!data.value || typeof data.value !== 'string') { throw new ValidationError(`Iteration field '${field.name}' requires a valid iteration ID string`); } mutation = ` mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $iterationId: ID!) { updateProjectV2ItemFieldValue(input: { projectId: $projectId itemId: $itemId fieldId: $fieldId value: { iterationId: $iterationId } }) { projectV2Item { id } } } `; variables.iterationId = String(data.value); break; case 'MILESTONE': // For milestone fields, the value should be a milestone ID if (!data.value || typeof data.value !== 'string') { throw new ValidationError(`Milestone field '${field.name}' requires a valid milestone ID string`); } mutation = ` mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $milestoneId: ID!) { updateProjectV2ItemFieldValue(input: { projectId: $projectId itemId: $itemId fieldId: $fieldId value: { milestoneId: $milestoneId } }) { projectV2Item { id } } } `; variables.milestoneId = String(data.value); break; case 'ASSIGNEES': // For user fields, the value should be an array of user IDs if (!data.value) { throw new ValidationError(`Assignees field '${field.name}' requires at least one user ID`); } const userIds = Array.isArray(data.value) ? data.value : [data.value]; if (userIds.length === 0 || userIds.some(id => !id || typeof id !== 'string')) { throw new ValidationError(`Assignees field '${field.name}' requires valid user ID strings`); } mutation = ` mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $userIds: [ID!]!) { updateProjectV2ItemFieldValue(input: { projectId: $projectId itemId: $itemId fieldId: $fieldId value: { userIds: $userIds } }) { projectV2Item { id } } } `; variables.userIds = userIds.map((id: any) => String(id)); break; case 'LABELS': // For label fields, the value should be an array of label IDs if (!data.value) { throw new ValidationError(`Labels field '${field.name}' requires at least one label ID`); } const labelIds = Array.isArray(data.value) ? data.value : [data.value]; if (labelIds.length === 0 || labelIds.some(id => !id || typeof id !== 'string')) { throw new ValidationError(`Labels field '${field.name}' requires valid label ID strings`); } mutation = ` mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $labelIds: [ID!]!) { updateProjectV2ItemFieldValue(input: { projectId: $projectId itemId: $itemId fieldId: $fieldId value: { labelIds: $labelIds } }) { projectV2Item { id } } } `; variables.labelIds = labelIds.map((id: any) => String(id)); break; default: throw new ValidationError(`Unsupported field type: ${field.dataType}. Supported types: TEXT, NUMBER, DATE, SINGLE_SELECT, ITERATION, MILESTONE, ASSIGNEES, LABELS`); } interface UpdateFieldValueResponse { updateProjectV2ItemFieldValue: { projectV2Item: { id: string; } } } await this.factory.graphql<UpdateFieldValueResponse>(mutation, variables); return { success: true, message: `Field value updated successfully for field '${field.name}'` }; } catch (error) { throw this.mapErrorToMCPError(error); } }
- Zod input schema validation and complete ToolDefinition including description and comprehensive examples for various field types.// Schema for set_field_value tool export const setFieldValueSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), itemId: z.string().min(1, "Item ID is required"), fieldId: z.string().min(1, "Field ID is required"), value: z.any(), }); export type SetFieldValueArgs = z.infer<typeof setFieldValueSchema>; // Schema for get_field_value tool export const getFieldValueSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), itemId: z.string().min(1, "Item ID is required"), fieldId: z.string().min(1, "Field ID is required"), }); export type GetFieldValueArgs = z.infer<typeof getFieldValueSchema>; // Schema for clear_field_value tool export const clearFieldValueSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), itemId: z.string().min(1, "Item ID is required"), fieldId: z.string().min(1, "Field ID is required"), }); export type ClearFieldValueArgs = z.infer<typeof clearFieldValueSchema>; // Schema for list_project_views tool export const listProjectViewsSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), }); export type ListProjectViewsArgs = z.infer<typeof listProjectViewsSchema>; // Schema for update_project_view tool export const updateProjectViewSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), viewId: z.string().min(1, "View ID is required"), name: z.string().optional(), layout: z.enum(["board", "table", "timeline", "roadmap"]).optional(), }); export type UpdateProjectViewArgs = z.infer<typeof updateProjectViewSchema>; // Schema for delete_project_view tool export const deleteProjectViewSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), viewId: z.string().min(1, "View ID is required"), }); export type DeleteProjectViewArgs = z.infer<typeof deleteProjectViewSchema>; // Schema for update_milestone tool export const updateMilestoneSchema = z.object({ milestoneId: z.string().min(1, "Milestone ID is required"), title: z.string().optional(), description: z.string().optional(), dueDate: z.string().datetime().optional().nullable(), state: z.enum(["open", "closed"]).optional(), }); export type UpdateMilestoneArgs = z.infer<typeof updateMilestoneSchema>; // Schema for delete_milestone tool export const deleteMilestoneSchema = z.object({ milestoneId: z.string().min(1, "Milestone ID is required"), }); export type DeleteMilestoneArgs = z.infer<typeof deleteMilestoneSchema>; // Schema for update_sprint tool export const updateSprintSchema = z.object({ sprintId: z.string().min(1, "Sprint ID is required"), title: z.string().optional(), description: z.string().optional(), startDate: z.string().datetime().optional(), endDate: z.string().datetime().optional(), status: z.enum(["planned", "active", "completed"]).optional(), }); export type UpdateSprintArgs = z.infer<typeof updateSprintSchema>; // Schema for add_issues_to_sprint tool export const addIssuesToSprintSchema = z.object({ sprintId: z.string().min(1, "Sprint ID is required"), issueIds: z.array(z.string()).min(1, "At least one issue ID is required"), }); export type AddIssuesToSprintArgs = z.infer<typeof addIssuesToSprintSchema>; // Schema for remove_issues_from_sprint tool export const removeIssuesFromSprintSchema = z.object({ sprintId: z.string().min(1, "Sprint ID is required"), issueIds: z.array(z.string()).min(1, "At least one issue ID is required"), }); export type RemoveIssuesFromSprintArgs = z.infer<typeof removeIssuesFromSprintSchema>; // Schema for create_label tool export const createLabelSchema = z.object({ name: z.string().min(1, "Label name is required"), color: z.string().regex(/^[0-9a-fA-F]{6}$/, "Color must be a valid 6-digit hex color code without #"), description: z.string().optional(), }); export type CreateLabelArgs = z.infer<typeof createLabelSchema>; // Schema for list_labels tool export const listLabelsSchema = z.object({ limit: z.number().int().positive().default(100).optional(), }); export type ListLabelsArgs = z.infer<typeof listLabelsSchema>; // ============================================================================ // Automation Service Tools // ============================================================================ // Schema for create_automation_rule tool export const createAutomationRuleSchema = z.object({ name: z.string().min(1, "Rule name is required"), description: z.string().optional(), projectId: z.string().min(1, "Project ID is required"), enabled: z.boolean().optional().default(true), triggers: z.array(z.object({ type: z.enum([ "resource_created", "resource_updated", "resource_deleted", "issue_opened", "issue_closed", "issue_labeled", "issue_assigned", "pr_opened", "pr_closed", "pr_merged", "pr_approved", "sprint_started", "sprint_ended", "milestone_reached", "schedule" ]), resourceType: z.string().optional(), conditions: z.array(z.object({ field: z.string(), operator: z.string(), value: z.any() })).optional() })), actions: z.array(z.object({ type: z.enum([ "update_resource", "create_resource", "delete_resource", "add_label", "remove_label", "assign_user", "unassign_user", "create_relationship", "delete_relationship", "notify", "webhook", "custom_script" ]), parameters: z.record(z.any()) })) }); export type CreateAutomationRuleArgs = z.infer<typeof createAutomationRuleSchema>; // Schema for update_automation_rule tool export const updateAutomationRuleSchema = z.object({ ruleId: z.string().min(1, "Rule ID is required"), name: z.string().optional(), description: z.string().optional(), enabled: z.boolean().optional(), triggers: z.array(z.object({ type: z.enum([ "resource_created", "resource_updated", "resource_deleted", "issue_opened", "issue_closed", "issue_labeled", "issue_assigned", "pr_opened", "pr_closed", "pr_merged", "pr_approved", "sprint_started", "sprint_ended", "milestone_reached", "schedule" ]), resourceType: z.string().optional(), conditions: z.array(z.object({ field: z.string(), operator: z.string(), value: z.any() })).optional() })).optional(), actions: z.array(z.object({ type: z.enum([ "update_resource", "create_resource", "delete_resource", "add_label", "remove_label", "assign_user", "unassign_user", "create_relationship", "delete_relationship", "notify", "webhook", "custom_script" ]), parameters: z.record(z.any()) })).optional() }); export type UpdateAutomationRuleArgs = z.infer<typeof updateAutomationRuleSchema>; // Schema for delete_automation_rule tool export const deleteAutomationRuleSchema = z.object({ ruleId: z.string().min(1, "Rule ID is required") }); export type DeleteAutomationRuleArgs = z.infer<typeof deleteAutomationRuleSchema>; // Schema for get_automation_rule tool export const getAutomationRuleSchema = z.object({ ruleId: z.string().min(1, "Rule ID is required") }); export type GetAutomationRuleArgs = z.infer<typeof getAutomationRuleSchema>; // Schema for list_automation_rules tool export const listAutomationRulesSchema = z.object({ projectId: z.string().min(1, "Project ID is required") }); export type ListAutomationRulesArgs = z.infer<typeof listAutomationRulesSchema>; // Schema for enable_automation_rule tool export const enableAutomationRuleSchema = z.object({ ruleId: z.string().min(1, "Rule ID is required") }); export type EnableAutomationRuleArgs = z.infer<typeof enableAutomationRuleSchema>; // Schema for disable_automation_rule tool export const disableAutomationRuleSchema = z.object({ ruleId: z.string().min(1, "Rule ID is required") }); export type DisableAutomationRuleArgs = z.infer<typeof disableAutomationRuleSchema>; // ============================================================================ // Iteration Management Tools // ============================================================================ // Schema for get_iteration_configuration tool export const getIterationConfigurationSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), fieldName: z.string().optional() }); export type GetIterationConfigurationArgs = z.infer<typeof getIterationConfigurationSchema>; // Schema for get_current_iteration tool export const getCurrentIterationSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), fieldName: z.string().optional() }); export type GetCurrentIterationArgs = z.infer<typeof getCurrentIterationSchema>; // Schema for get_iteration_items tool export const getIterationItemsSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), iterationId: z.string().min(1, "Iteration ID is required"), limit: z.number().int().positive().default(50).optional() }); export type GetIterationItemsArgs = z.infer<typeof getIterationItemsSchema>; // Schema for get_iteration_by_date tool export const getIterationByDateSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), date: z.string().datetime("Date must be a valid ISO date string"), fieldName: z.string().optional() }); export type GetIterationByDateArgs = z.infer<typeof getIterationByDateSchema>; // Schema for assign_items_to_iteration tool export const assignItemsToIterationSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), itemIds: z.array(z.string()).min(1, "At least one item ID is required"), iterationId: z.string().min(1, "Iteration ID is required"), fieldName: z.string().optional() }); export type AssignItemsToIterationArgs = z.infer<typeof assignItemsToIterationSchema>; // ============================================================================ // AI-Powered Automation Tools // ============================================================================ // Schema for generate_roadmap tool export const generateRoadmapSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), projectTitle: z.string().min(1, "Project title is required"), projectDescription: z.string().optional(), sprintDurationWeeks: z.number().int().positive().default(2).optional(), targetMilestones: z.number().int().positive().default(4).optional(), autoCreate: z.boolean().default(false).optional() }); export type GenerateRoadmapArgs = z.infer<typeof generateRoadmapSchema>; // Schema for enrich_issue tool export const enrichIssueSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), issueId: z.string().min(1, "Issue ID is required"), issueNumber: z.number().int().positive(), issueTitle: z.string().min(1, "Issue title is required"), issueDescription: z.string().optional(), projectContext: z.string().optional(), autoApply: z.boolean().default(false).optional() }); export type EnrichIssueArgs = z.infer<typeof enrichIssueSchema>; // Schema for enrich_issues_bulk tool export const enrichIssuesBulkSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), issueIds: z.array(z.string()).optional(), projectContext: z.string().optional(), autoApply: z.boolean().default(false).optional() }); export type EnrichIssuesBulkArgs = z.infer<typeof enrichIssuesBulkSchema>; // Schema for triage_issue tool export const triageIssueSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), issueId: z.string().min(1, "Issue ID is required"), issueNumber: z.number().int().positive(), issueTitle: z.string().min(1, "Issue title is required"), issueDescription: z.string().optional(), projectContext: z.string().optional(), autoApply: z.boolean().default(false).optional() }); export type TriageIssueArgs = z.infer<typeof triageIssueSchema>; // Schema for triage_all_issues tool export const triageAllIssuesSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), onlyUntriaged: z.boolean().default(true).optional(), autoApply: z.boolean().default(false).optional(), projectContext: z.string().optional() }); export type TriageAllIssuesArgs = z.infer<typeof triageAllIssuesSchema>; // Schema for schedule_triaging tool export const scheduleTriagingSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), schedule: z.enum(['hourly', 'daily', 'weekly']), autoApply: z.boolean().default(false) }); export type ScheduleTriagingArgs = z.infer<typeof scheduleTriagingSchema>; // Project tools export const updateProjectTool: ToolDefinition<UpdateProjectArgs> = { name: "update_project", description: "Update an existing GitHub project", schema: updateProjectSchema as unknown as ToolSchema<UpdateProjectArgs>, examples: [ { name: "Update project title and visibility", description: "Change a project's title and make it public", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", title: "Updated API Development", visibility: "public" } }, { name: "Close a project", description: "Mark a project as closed", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", status: "closed" } } ] }; export const deleteProjectTool: ToolDefinition<DeleteProjectArgs> = { name: "delete_project", description: "Delete a GitHub project", schema: deleteProjectSchema as unknown as ToolSchema<DeleteProjectArgs>, examples: [ { name: "Delete project", description: "Delete a GitHub project by ID", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] }; export const getProjectReadmeTool: ToolDefinition<GetProjectReadmeArgs> = { name: "get_project_readme", description: "Get the README content of a GitHub project", schema: getProjectReadmeSchema as unknown as ToolSchema<GetProjectReadmeArgs>, examples: [ { name: "Get project README", description: "Retrieve the README for a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] }; export const updateProjectReadmeTool: ToolDefinition<UpdateProjectReadmeArgs> = { name: "update_project_readme", description: "Update the README content of a GitHub project", schema: updateProjectReadmeSchema as unknown as ToolSchema<UpdateProjectReadmeArgs>, examples: [ { name: "Set project README", description: "Update the project README with documentation", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", readme: "# Project Overview\n\nThis project tracks our development roadmap..." } } ] }; export const listProjectFieldsTool: ToolDefinition<ListProjectFieldsArgs> = { name: "list_project_fields", description: "List all fields in a GitHub project", schema: listProjectFieldsSchema as unknown as ToolSchema<ListProjectFieldsArgs>, examples: [ { name: "List project fields", description: "Get all fields for a specific project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] }; export const updateProjectFieldTool: ToolDefinition<UpdateProjectFieldArgs> = { name: "update_project_field", description: "Update a custom field in a GitHub project", schema: updateProjectFieldSchema as unknown as ToolSchema<UpdateProjectFieldArgs>, examples: [ { name: "Update field options", description: "Update options for a single-select field", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI1", name: "Updated Status", options: [ { name: "Not Started", color: "red" }, { name: "In Progress", color: "yellow" }, { name: "Review", color: "blue" }, { name: "Complete", color: "green" } ] } } ] }; export const addProjectItemTool: ToolDefinition<AddProjectItemArgs> = { name: "add_project_item", description: "Add an item to a GitHub project", schema: addProjectItemSchema as unknown as ToolSchema<AddProjectItemArgs>, examples: [ { name: "Add issue to project", description: "Add an existing issue to a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", contentId: "I_kwDOJrIzLs5eGXAT", contentType: "issue" } } ] }; export const removeProjectItemTool: ToolDefinition<RemoveProjectItemArgs> = { name: "remove_project_item", description: "Remove an item from a GitHub project", schema: removeProjectItemSchema as unknown as ToolSchema<RemoveProjectItemArgs>, examples: [ { name: "Remove item from project", description: "Remove an item from a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7" } } ] }; export const listProjectItemsTool: ToolDefinition<ListProjectItemsArgs> = { name: "list_project_items", description: "List all items in a GitHub project", schema: listProjectItemsSchema as unknown as ToolSchema<ListProjectItemsArgs>, examples: [ { name: "List project items", description: "Get all items in a project with limit", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", limit: 20 } } ] }; export const archiveProjectItemTool: ToolDefinition<ArchiveProjectItemArgs> = { name: "archive_project_item", description: "Archive an item in a GitHub project. Archived items are hidden from views but not deleted.", schema: archiveProjectItemSchema as unknown as ToolSchema<ArchiveProjectItemArgs>, examples: [ { name: "Archive completed task", description: "Archive a project item that is complete", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7" } } ] }; export const unarchiveProjectItemTool: ToolDefinition<UnarchiveProjectItemArgs> = { name: "unarchive_project_item", description: "Unarchive an item in a GitHub project. Brings back a previously archived item.", schema: unarchiveProjectItemSchema as unknown as ToolSchema<UnarchiveProjectItemArgs>, examples: [ { name: "Unarchive task", description: "Restore an archived project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7" } } ] }; export const setFieldValueTool: ToolDefinition<SetFieldValueArgs> = { name: "set_field_value", description: "Set a field value for a GitHub project item. Supports all field types: TEXT, NUMBER, DATE, SINGLE_SELECT, ITERATION, MILESTONE, ASSIGNEES, LABELS", schema: setFieldValueSchema as unknown as ToolSchema<SetFieldValueArgs>, examples: [ { name: "Set text field value", description: "Set a text field value for a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI1", value: "Updated task description" } }, { name: "Set number field value", description: "Set a number field (e.g., story points) for a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI2", value: 8 } }, { name: "Set date field value", description: "Set a date field for a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI3", value: "2025-06-15" } }, { name: "Set single select field value", description: "Set status field value for a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI4", value: "In Progress" } }, { name: "Set iteration field value", description: "Assign a project item to a specific iteration/sprint", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI5", value: "PVTI_kwDOLhQ7gc4AOEbHzM4AOAIter1" } }, { name: "Set milestone field value", description: "Assign a project item to a specific milestone", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI6", value: "MI_kwDOLhQ7gc4AOEbHzM4AOAMile1" } }, { name: "Set assignees field value", description: "Assign multiple users to a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI7", value: ["MDQ6VXNlcjEyMzQ1Njc4", "MDQ6VXNlcjg3NjU0MzIx"] } }, { name: "Set single assignee field value", description: "Assign a single user to a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI7", value: "MDQ6VXNlcjEyMzQ1Njc4" } }, { name: "Set labels field value", description: "Assign multiple labels to a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI8", value: ["LA_kwDOLhQ7gc4AOEbHzM4AOAL1", "LA_kwDOLhQ7gc4AOEbHzM4AOAL2"] } }, { name: "Set single label field value", description: "Assign a single label to a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI8", value: "LA_kwDOLhQ7gc4AOEbHzM4AOAL1" } } ] };
- src/infrastructure/tools/ToolRegistry.ts:259-262 (registration)ToolRegistry registers the setFieldValueTool during initialization of built-in tools.// Register field value tools this.registerTool(setFieldValueTool); this.registerTool(getFieldValueTool); this.registerTool(clearFieldValueTool);
- src/index.ts:421-422 (handler)MCP server request handler switch statement that dispatches 'set_field_value' tool calls to ProjectManagementService.setFieldValue.case "set_field_value": return await this.service.setFieldValue(args);