Skip to main content
Glama

jira_get_field_options

Retrieve available field options for Jira issues by specifying project, issue type, and field to ensure accurate data entry and workflow compliance.

Instructions

Get allowed values/options for a specific field in a project and issue type context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesProject key
issueTypeYesIssue type name
fieldKeyYesField key (e.g., 'fixVersions', 'components', 'customfield_10001')

Implementation Reference

  • The MCP tool handler case in the switch statement that validates the input parameters using GetFieldOptionsSchema and delegates execution to jiraClient.getFieldOptions, returning the JSON stringified result.
    case "jira_get_field_options": {
      const { projectKey, issueType, fieldKey } =
        GetFieldOptionsSchema.parse(args);
      const options = await jiraClient.getFieldOptions(
        projectKey,
        issueType,
        fieldKey
      );
      return {
        content: [{ type: "text", text: JSON.stringify(options, null, 2) }],
      };
    }
  • Core implementation of getting field options: retrieves create metadata for the project and issue type via getCreateMeta, finds the specific field by ID, and returns its allowedValues array or empty array.
    async getFieldOptions(
      projectKey: string,
      issueTypeName: string,
      fieldKey: string
    ): Promise<unknown> {
      const meta = await this.getCreateMeta(projectKey, issueTypeName);
      const issueType = meta.issueTypes[0];
      if (!issueType?.fields) {
        return [];
      }
      const field = issueType.fields.find((f) => f.fieldId === fieldKey);
      return field?.allowedValues || [];
    }
  • Zod schema used for runtime input validation in the tool handler.
    const GetFieldOptionsSchema = z.object({
      projectKey: z.string().describe("Project key"),
      issueType: z.string().describe("Issue type name"),
      fieldKey: z
        .string()
        .describe(
          "Field key (e.g., 'fixVersions', 'components', 'customfield_10001')"
        ),
    });
  • src/index.ts:530-546 (registration)
    Tool definition registered in the MCP server's tools list, including name, description, and input schema for tool discovery.
      name: "jira_get_field_options",
      description:
        "Get allowed values/options for a specific field in a project and issue type context",
      inputSchema: {
        type: "object",
        properties: {
          projectKey: { type: "string", description: "Project key" },
          issueType: { type: "string", description: "Issue type name" },
          fieldKey: {
            type: "string",
            description:
              "Field key (e.g., 'fixVersions', 'components', 'customfield_10001')",
          },
        },
        required: ["projectKey", "issueType", "fieldKey"],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the tool 'gets' values, implying a read-only operation, but does not disclose behavioral traits such as authentication requirements, rate limits, error handling, or what the return format looks like (e.g., list of options). This leaves gaps for an agent to understand how to invoke it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Get allowed values/options') and includes essential context. There is no wasted verbiage, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 100% schema coverage, the description is adequate but incomplete. It covers the basic purpose and context but lacks details on behavioral aspects (e.g., response format, errors) and usage guidelines, which are important for a tool with three required parameters in a complex domain like Jira.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters (projectKey, issueType, fieldKey) with basic descriptions. The description adds minimal value beyond the schema by implying these parameters define the context for retrieving field options, but does not provide additional semantics like examples beyond the schema's fieldKey example or explain interdependencies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'allowed values/options for a specific field', with context 'in a project and issue type context'. It specifies what the tool retrieves (field options) and the required context, but does not explicitly differentiate from siblings like 'jira_get_fields' or 'jira_get_edit_meta', which might provide overlapping metadata.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The description mentions the context (project and issue type) but does not specify prerequisites, exclusions, or compare it to sibling tools like 'jira_get_fields' or 'jira_get_edit_meta' that might also provide field information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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