create_issue
Create new issues in Redmine projects to track tasks, bugs, or feature requests through the Cline VS Code extension.
Instructions
Create a new Redmine issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID | |
| subject | Yes | Issue subject | |
| description | Yes | Issue description |
Implementation Reference
- server.js:149-200 (handler)Main handler for CallToolRequestSchema that implements the logic for the 'create_issue' tool, including validation, API call to Redmine, and response formatting.this.server.setRequestHandler(CallToolRequestSchema, async (request) => { if (request.params.name !== 'create_issue') { throw new McpError( ErrorCode.MethodNotFound, `Unknown tool: ${request.params.name}` ); } if (!isValidCreateIssueArgs(request.params.arguments)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid create_issue arguments' ); } const { project_id, subject, description } = request.params.arguments; try { const issue = await new Promise((resolve, reject) => { redmine.create_issue({ project_id: project_id, subject: subject, description: description, }, (err, data) => { if (err) { reject(err); } else { resolve(data); } }); }); return { content: [ { type: 'text', text: JSON.stringify(issue), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Redmine API error: ${error}`, }, ], isError: true, }; } });
- server.js:127-144 (schema)Input schema definition for the create_issue tool, specifying required parameters and types.inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID', }, subject: { type: 'string', description: 'Issue subject', }, description: { type: 'string', description: 'Issue description', }, }, required: ['project_id', 'subject', 'description'], },
- server.js:122-147 (registration)Registration of the create_issue tool in the ListToolsRequestSchema response, including name, description, and schema.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ { name: 'create_issue', description: 'Create a new Redmine issue', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID', }, subject: { type: 'string', description: 'Issue subject', }, description: { type: 'string', description: 'Issue description', }, }, required: ['project_id', 'subject', 'description'], }, }, ], }));
- server.js:25-27 (helper)Helper function used to validate the arguments passed to the create_issue tool.const isValidCreateIssueArgs = ( args ) => typeof args === 'object' && args !== null && typeof args.project_id === 'string' && typeof args.subject === 'string' && typeof args.description === 'string';