Skip to main content
Glama

jira_get_create_meta

Retrieve required fields and allowed values for creating Jira issues in a specific project, ensuring proper issue setup by identifying mandatory inputs and dropdown options before submission.

Instructions

Get metadata for creating issues - shows required fields and allowed values (dropdown options) for a project and issue type. IMPORTANT: Call this before creating an issue to know what fields are required and what values are allowed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesProject key to get metadata for
issueTypeNoIssue type name to filter (e.g., Bug, Task, Story)

Implementation Reference

  • Core handler function that retrieves create metadata for a Jira project, fetching issue types and their field configurations including required fields and allowed values.
    async getCreateMeta( projectKey: string, issueTypeName?: string ): Promise<{ projectKey: string; issueTypes: Array<{ id: string; name: string; fields?: Array<{ fieldId: string; name: string; required: boolean; hasAllowedValues: boolean; allowedValues?: Array<{ id: string; name: string; value?: string }>; }>; }>; }> { const issueTypesResult = await this.getCreateMetaIssueTypes(projectKey); const issueTypes = issueTypesResult.values; // Filter by issue type name if provided const filteredTypes = issueTypeName ? issueTypes.filter( (t) => t.name.toLowerCase() === issueTypeName.toLowerCase() ) : issueTypes; // Get fields for each issue type const result = { projectKey, issueTypes: await Promise.all( filteredTypes.map(async (issueType) => { const fieldsResult = await this.getCreateMetaFields( projectKey, issueType.id ); return { id: issueType.id, name: issueType.name, fields: fieldsResult.values.map((f) => ({ fieldId: f.fieldId, name: f.name, required: f.required, hasAllowedValues: !!f.allowedValues, allowedValues: f.allowedValues, })), }; }) ), }; return result; }
  • Zod schema defining input parameters for the jira_get_create_meta tool: projectKey (required) and optional issueType.
    const GetCreateMetaSchema = z.object({ projectKey: z.string().describe("Project key to get metadata for"), issueType: z .string() .optional() .describe("Issue type name to filter (e.g., Bug, Task, Story)"), });
  • src/index.ts:456-474 (registration)
    Tool registration in the list of available tools, including name, description, and input schema.
    { name: "jira_get_create_meta", description: "Get metadata for creating issues - shows required fields and allowed values (dropdown options) for a project and issue type. IMPORTANT: Call this before creating an issue to know what fields are required and what values are allowed.", inputSchema: { type: "object", properties: { projectKey: { type: "string", description: "Project key to get metadata for", }, issueType: { type: "string", description: "Issue type name to filter (e.g., Bug, Task, Story)", }, }, required: ["projectKey"], }, },
  • Helper method to fetch available issue types for create meta in a project via Jira API.
    async getCreateMetaIssueTypes(projectKey: string): Promise<{ values: Array<{ id: string; name: string; description: string; subtask: boolean; }>; total: number; }> { return this.request<{ values: Array<{ id: string; name: string; description: string; subtask: boolean; }>; total: number; }>(`/issue/createmeta/${projectKey}/issuetypes`); }
  • Helper method to fetch field metadata (required, allowed values) for a specific issue type in create meta context.
    async getCreateMetaFields( projectKey: string, issueTypeId: string ): Promise<{ values: Array<{ fieldId: string; name: string; required: boolean; allowedValues?: Array<{ id: string; name: string; value?: string }>; schema: { type: string; system?: string; custom?: string }; defaultValue?: unknown; }>; total: number; }> { return this.request<{ values: Array<{ fieldId: string; name: string; required: boolean; allowedValues?: Array<{ id: string; name: string; value?: string }>; schema: { type: string; system?: string; custom?: string }; defaultValue?: unknown; }>; total: number; }>( `/issue/createmeta/${projectKey}/issuetypes/${issueTypeId}?maxResults=100` ); }

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/yogeshhrathod/JiraMCP'

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