Skip to main content
Glama

get_ticket

Read-onlyIdempotent

Retrieve full details of an existing ticket by ID from supported ITSM systems including ServiceNow, Jira, Zendesk, Ivanti Neurons, and Cherwell.

Instructions

Retrieve full details of an existing ticket by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticket_idYesID of the ticket to retrieve (e.g. JIRA-1000)
systemNoITSM system to usejira

Implementation Reference

  • The core handler function `getTicket` that retrieves a ticket from the in-memory Map by ticket_id. Returns the ticket object or an error if not found.
    function getTicket({ ticket_id }) {
      const ticket = tickets.get(ticket_id);
      if (!ticket) return { success: false, error: `Ticket ${ticket_id} not found` };
      return { success: true, ticket: { ...ticket } };
    }
  • index.js:204-222 (registration)
    Registration of the 'get_ticket' tool on the MCP server using `server.tool()`, including Zod schema for ticket_id input, tool annotations (readOnlyHint: true), and the async handler that calls getTicket().
    server.tool(
      'get_ticket',
      'Retrieve full details of an existing ticket by ID',
      {
        ticket_id: z.string().describe('ID of the ticket to retrieve (e.g. JIRA-1000)'),
        system: systemSchema.optional(),
      },
      {
        title: 'Get Ticket',
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false,
      },
      async ({ ticket_id }) => {
        const result = getTicket({ ticket_id });
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      },
    );
  • Frontend service wrapper method `getTicket` that calls the MCP 'get_ticket' tool via `this.callTool()`, passing ticket_id and optionally system.
    async getTicket(ticketId, system = null) {
      return this.callTool('get_ticket', {
        ticket_id: ticketId,
        ...(system && { system }),
      });
    }
  • Frontend UI handler `handleViewTicket` that calls `mcpService.getTicket(ticketId)` and displays the result in a modal.
    const handleViewTicket = async (ticketId) => {
      setLoading(true);
      setError(null);
      try {
        const result = await mcpService.getTicket(ticketId);
        if (result.success) {
          setSelectedTicket(result.ticket);
          setShowTicketModal(true);
        } else {
          setError(result.error || 'Failed to load ticket');
        }
      } catch (err) {
Behavior3/5

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

Annotations fully cover safety profile (readOnly, idempotent). Description adds only 'Retrieve full details', consistent with annotations, no additional behavioral context beyond that.

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?

Single sentence with no wasted words, front-loaded with the key action and resource.

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

Completeness4/5

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

For a simple read tool with two parameters and no output schema, description adequately states purpose. Could mention that result includes full ticket details, but not necessary.

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 has 100% coverage with descriptions for both parameters. Description does not add further meaning; the schema already explains ticket_id and system.

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

Purpose5/5

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

Description uses specific verb 'Retrieve' and resource 'full details of an existing ticket by ID', clearly distinguishing from siblings like list_tickets (list multiple) or update_ticket (modify).

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

Usage Guidelines4/5

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

Clear that tool is for retrieving a single ticket by ID, but lacks explicit 'when not to use' or comparison to alternatives like list_tickets for browsing.

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/madosh/MCP-ITSM'

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