Skip to main content
Glama

create_issue

Create Jira issues by specifying project, summary, and description to track tasks, bugs, or features in your workflow.

Instructions

Create an issue in Jira

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyOrIdYesThe key or ID of the project
summaryYesThe summary of the issue
descriptionYesThe description of the issue

Implementation Reference

  • Core handler function for the 'create_issue' tool. Constructs a Jira issue payload with project, task type, summary, and description, then POSTs it to the Jira REST API endpoint `/rest/api/2/issue` using the `$jiraJson` utility.
    export async function createIssue(input: CreateIssueInput) { const url = new URL(`/rest/api/2/issue`, env.JIRA_BASE_URL); const payload = { fields: { project: { key: input.projectKeyOrId }, issuetype: { name: ISSUE_TYPES.TASK }, summary: input.summary, description: input.description, }, }; const json = await $jiraJson(url.toString(), { method: "POST", body: JSON.stringify(payload), }); if (json.isErr()) return err(json.error); return ok(json.value); }
  • Zod input schema for validating the parameters of the 'create_issue' tool: projectKeyOrId, summary, and description.
    export const createIssueInputSchema = z.object({ projectKeyOrId: z.string().describe("The key or ID of the project"), summary: z.string().describe("The summary of the issue"), description: z.string().describe("The description of the issue"), });
  • Tool registration object defining the name, description, and input schema for 'create_issue', exported for use in the main app.
    export const CREATE_ISSUE_TOOL: Tool = { name: "create_issue", description: "Create an issue in Jira", inputSchema: zodToJsonSchema(createIssueInputSchema) as Tool["inputSchema"], };
  • src/app.ts:39-48 (registration)
    Central tools array registration that includes CREATE_ISSUE_TOOL among other tools, used by the MCP server's ListToolsRequestHandler.
    export const tools = [ // list LIST_PROJECTS_TOOL, LIST_BOARDS_TOOL, LIST_SPRINTS_FROM_BOARD_TOOL, LIST_ISSUES_FROM_SPRINT_TOOL, // create CREATE_ISSUE_TOOL, ] satisfies Tool[];
  • Dispatch logic in the main CallToolRequestHandler that validates input using the schema and invokes the createIssue handler for the 'create_issue' tool.
    if (name === CREATE_ISSUE_TOOL.name) { const input = createIssueInputSchema.safeParse(args); if (!input.success) { return { isError: true, content: [{ type: "text", text: "Invalid input" }], }; } const result = await createIssue(input.data); if (result.isErr()) { console.error(result.error.message); return { isError: true, content: [{ type: "text", text: "An error occurred" }], }; } return { content: [ { type: "text", text: JSON.stringify(result.value, null, 2) }, ], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ParasSolanki/jira-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server