query_assignable
Retrieve assignable users for a Jira ticket by specifying the project key, enabling efficient task allocation and management using the /rest/api/3/user/assignable/search API.
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
| Name | Required | Description | Default |
|---|---|---|---|
| project_key | Yes | The id of the project to search |
Implementation Reference
- src/index.ts:403-424 (handler)The handler function that executes the tool logic by querying the Jira API for assignable users in the specified project.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, }; } }
- src/index.ts:229-242 (schema)The input schema defining the parameters for the query_assignable tool (project_key).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 in the CallToolRequestHandler switch statement that invokes the queryAssignable handler.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), }, ], }; }