Skip to main content
Glama
KS-GEN-AI

Jira MCP Server

by KS-GEN-AI

query_assignable

Find users who can be assigned to Jira tickets in a specific project. Use this tool to identify available assignees when managing task allocation.

Instructions

Query assignables to a ticket on Jira on the api /rest/api/3/user/assignable/search?project={project-name}. Do not use markdown in your query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYesThe id of the project to search

Implementation Reference

  • The core implementation of the 'query_assignable' tool handler. It performs an HTTP GET request to Jira's assignable users search endpoint using the provided project_key, returning the list of assignable users or an error.
    async function queryAssignable(project_key: string): Promise<any> {
      try {
        const params = {
          project: project_key, // JQL query string
        };
    
        const response = await axios.get(
          `${JIRA_URL}/rest/api/3/user/assignable/search`,
          {
            headers: getAuthHeaders().headers,
            params,
          },
        );
    
        return response.data;
      } catch (error: any) {
        //return the error in a json
        return {
          error: error.response.data,
        };
      }
    }
  • The schema definition for the 'query_assignable' tool, registered in the ListTools handler. Defines the input schema requiring a 'project_key' string.
      name: 'query_assignable',
      description:
        'Query assignables to a ticket on Jira on the api /rest/api/3/user/assignable/search?project={project-name}. Do not use markdown in your query.',
      inputSchema: {
        type: 'object',
        properties: {
          project_key: {
            type: 'string',
            description: 'The id of the project to search',
          },
        },
        required: ['project_key'],
      },
    },
  • src/index.ts:904-921 (registration)
    The registration and dispatching logic for the 'query_assignable' tool in the CallToolRequestSchema handler's switch statement. Extracts 'project_key' from arguments and invokes the handler function.
    case 'query_assignable': {
      const project_key: any = request.params.arguments?.project_key;
    
      if (!project_key) {
        throw new Error('Query is required');
      }
    
      const response = await queryAssignable(project_key);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response, 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/KS-GEN-AI/jira-mcp-server'

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