Skip to main content
Glama

get_only_ticket_name_and_description

Extract ticket names and descriptions from Jira using JQL queries to quickly access essential issue details without markdown formatting.

Instructions

Get the name and description of the requested tickets on the api /rest/api/3/search/jql. Do not use markdown in your query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jqlYesJQL query string
number_of_resultsNoNumber of results to return

Implementation Reference

  • Handler implementation inside the MCP server request handler switch statement. Extracts JQL query and number of results, calls executeJQL helper, maps issues to only key, summary, and description, and returns formatted JSON.
    case 'get_only_ticket_name_and_description': { const jql = String(request.params.arguments?.jql); const number_of_results = Number( request.params.arguments?.number_of_results ?? 1, ); if (!jql) { throw new Error('JQL query is required'); } const response = await executeJQL(jql, number_of_results); // Return only the ticket name and description const tickets = response.issues.map((issue: any) => { return { key: issue.key, summary: issue.fields.summary, description: issue.fields.description, }; }); return { content: [ { type: 'text', text: JSON.stringify(tickets, null, 2), // Pretty print JSON }, ], }; }
  • Tool schema definition including name, description, and input JSON schema for JQL query and optional number of results.
    { name: 'get_only_ticket_name_and_description', description: 'Get the name and description of the requested tickets on the api /rest/api/3/search/jql. Do not use markdown in your query.', inputSchema: { type: 'object', properties: { jql: { type: 'string', description: 'JQL query string', }, number_of_results: { type: 'integer', description: 'Number of results to return', default: 1, }, }, required: ['jql'], }, },
  • src/index.ts:61-80 (registration)
    Tool registration as part of the tools array passed to the MCP server.
    { name: 'get_only_ticket_name_and_description', description: 'Get the name and description of the requested tickets on the api /rest/api/3/search/jql. Do not use markdown in your query.', inputSchema: { type: 'object', properties: { jql: { type: 'string', description: 'JQL query string', }, number_of_results: { type: 'integer', description: 'Number of results to return', default: 1, }, }, required: ['jql'], }, },
  • Helper function executeJQL used by the tool handler to perform the actual JQL search API call.
    async function executeJQL(jql: string, maxResults: number): Promise<any> { try { const params = { jql, // JQL query string maxResults, // Adjust as needed fields: '*all', // Request all fields }; const response = await axios.get(`${JIRA_URL}/rest/api/3/search/jql`, { headers: getAuthHeaders().headers, params, }); return response.data; } catch (error: any) { //return the error in a json return { error: error.response.data, }; } }

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