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
| Name | Required | Description | Default |
|---|---|---|---|
| project_key | Yes | The id of the project to search |
Implementation Reference
- src/index.ts:403-424 (handler)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, }; } }
- src/index.ts:229-242 (schema)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), }, ], }; }