UNPKG

redmine-mcp-tools

Version:

A comprehensive Model Context Protocol (MCP) server for Redmine integration. Provides 25+ specialized tools for complete Redmine API access including issue management, project administration, time tracking, and user management. Built with TypeScript and d

200 lines (199 loc) 6.19 kB
// List time entries tool export const TIME_ENTRY_LIST_TOOL = { name: "list_time_entries", description: "List time entries with optional filtering", inputSchema: { type: "object", properties: { offset: { type: "number", description: "Number of time entries to skip", default: 0, minimum: 0, }, limit: { type: "number", description: "Maximum time entries to return", minimum: 1, maximum: 100, default: 25, }, user_id: { type: "number", description: "Filter by user ID", }, project_id: { type: "number", description: "Filter by project ID", }, issue_id: { type: "number", description: "Filter by issue ID", }, spent_on: { type: "string", description: "Filter by date spent on (YYYY-MM-DD format or range like >=2024-01-01)", }, from: { type: "string", description: "Start date for filtering (YYYY-MM-DD)", }, to: { type: "string", description: "End date for filtering (YYYY-MM-DD)", }, }, additionalProperties: false, }, }; // Show time entry tool export const TIME_ENTRY_SHOW_TOOL = { name: "show_time_entry", description: "Get detailed information about a specific time entry", inputSchema: { type: "object", properties: { time_entry_id: { type: "number", description: "The ID of the time entry to retrieve", }, }, required: ["time_entry_id"], additionalProperties: false, }, }; // Create time entry for project tool export const TIME_ENTRY_CREATE_FOR_PROJECT_TOOL = { name: "create_time_entry_for_project", description: "Create a new time entry for a project", inputSchema: { type: "object", properties: { project_id: { type: "number", description: "The project ID", }, hours: { type: "number", description: "Number of hours spent", minimum: 0, }, activity_id: { type: "number", description: "The activity ID for the time entry", }, spent_on: { type: "string", description: "Date when time was spent (YYYY-MM-DD format)", }, comments: { type: "string", description: "Comments for the time entry", }, user_id: { type: "number", description: "User ID (if different from current user)", }, }, required: ["project_id", "hours", "activity_id", "spent_on"], additionalProperties: false, }, }; // Create time entry for issue tool export const TIME_ENTRY_CREATE_FOR_ISSUE_TOOL = { name: "create_time_entry_for_issue", description: "Create a new time entry for an issue", inputSchema: { type: "object", properties: { issue_id: { type: "number", description: "The issue ID", }, hours: { type: "number", description: "Number of hours spent", minimum: 0, }, activity_id: { type: "number", description: "The activity ID for the time entry", }, spent_on: { type: "string", description: "Date when time was spent (YYYY-MM-DD format)", }, comments: { type: "string", description: "Comments for the time entry", }, user_id: { type: "number", description: "User ID (if different from current user)", }, }, required: ["issue_id", "hours", "activity_id", "spent_on"], additionalProperties: false, }, }; // Update time entry tool export const TIME_ENTRY_UPDATE_TOOL = { name: "update_time_entry", description: "Update an existing time entry", inputSchema: { type: "object", properties: { time_entry_id: { type: "number", description: "The ID of the time entry to update", }, project_id: { type: "number", description: "The project ID", }, issue_id: { type: "number", description: "The issue ID", }, hours: { type: "number", description: "Number of hours spent", minimum: 0, }, activity_id: { type: "number", description: "The activity ID for the time entry", }, spent_on: { type: "string", description: "Date when time was spent (YYYY-MM-DD format)", }, comments: { type: "string", description: "Comments for the time entry", }, user_id: { type: "number", description: "User ID", }, }, required: ["time_entry_id"], additionalProperties: false, }, }; // Delete time entry tool export const TIME_ENTRY_DELETE_TOOL = { name: "delete_time_entry", description: "Delete a time entry", inputSchema: { type: "object", properties: { time_entry_id: { type: "number", description: "The ID of the time entry to delete", }, }, required: ["time_entry_id"], additionalProperties: false, }, };