close-ticket

close-ticket is a command for Claude Code from WYRE-AI/msp-claude-plugins. It costs 9 tokens per session (2,140 once invoked), scanned A, original, Apache-2.0.

A ticket-closing tool for ConnectWise PSA, a system for managing customer support work. It adds a resolution note, changes the ticket to a closed status, and can record time spent.

In plain words
What is it for?
Use it to finish resolved support tickets, notify the customer with a resolution note, and optionally log minutes worked.
Why use it?
It keeps the closing steps together and checks that the ticket has a valid closed status. This reduces the chance of closing a ticket without a resolution record or time entry.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the connectwise-psa plugin — 6 commands, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/wyre-ai/msp-claude-plugins/close-ticket
Clone the repo
git clone --depth 1 https://github.com/WYRE-AI/msp-claude-plugins

Made for: Claude Code.

Or install connectwise-psa, the plugin that ships this one along with the rest of its 6 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for close-ticket

README.md
[![agentmods](https://agentmods.dev/badge/commands/wyre-ai/msp-claude-plugins/close-ticket.svg)](https://agentmods.dev/commands/wyre-ai/msp-claude-plugins/close-ticket)
Your own site
<a href="https://agentmods.dev/commands/wyre-ai/msp-claude-plugins/close-ticket"><img src="https://agentmods.dev/badge/commands/wyre-ai/msp-claude-plugins/close-ticket.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,140 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00009 $0.02140
Opus 5 $0.00005 $0.01070
Sonnet 5 $0.00002 $0.00428
Haiku 4.5 $0.00001 $0.00214

Measured 2d ago against content hash 8702db2d6c20, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

close-ticket scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -X POST \
msp-claude-plugins/connectwise/manage/commands/close-ticket.md · 334 lines

How it starts

The opening of the file, as written. The whole thing — 334 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Close ConnectWise PSA Ticket

Close a ConnectWise ticket with resolution notes and optional time entry.

Prerequisites

  • Valid ConnectWise PSA API credentials configured
  • User must have ticket update permissions
  • Ticket must exist and be accessible
  • A valid closed status must exist on the ticket's board

Steps

  1. Validate ticket exists and get current state

    GET /service/tickets/{id}
    
    • Confirm ticket is accessible
    • Get current board ID for status lookup
    • Check if ticket is already closed
  2. Resolve closed status

    GET /service/boards/{boardId}/statuses?conditions=closedStatus=true
    
    • If status parameter provided, validate it's a closed status
    • Otherwise, use board's default closed status
  3. Add resolution note

    POST /service/tickets/{id}/notes
    Content-Type: application/json
    
    {
      "text": "<resolution>",
      "resolutionFlag": true,
      "internalAnalysisFlag": false,
      "customerUpdatedFlag": true,
      "processNotifications": true
    }
    
  4. Log time entry (if time_minutes provided)

    POST /time/entries
    Content-Type: application/json
    
    {
      "chargeToId": <ticket_id>,
      "chargeToType": "ServiceTicket",
      "timeStart": "<current_datetime>",
      "timeEnd": "<current_datetime + time_minutes>",
      "actualHours": <time_minutes / 60>,
      "notes": "<time_notes or resolution>",
      "billableOption": "<Billable or DoNotBill>"
    }
    
  5. Update ticket status to closed

    PATCH /service/tickets/{id}
    Content-Type: application/json
    
    [
      {"op": "replace", "path": "/status/id", "value": <closed_status_id>},
      {"op": "replace", "path": "/resolution", "value": "<resolution>"}
    ]
    
  6. Return closure confirmation

Parameters

Parameter Type Required Default Description
ticket_id integer Yes - ConnectWise ticket ID to close
resolution string Yes - Resolution notes
status string No Board default Closed status name
time_minutes integer No - Final time entry in minutes
time_notes string No - Notes for time entry
billable boolean No true Mark time as billable

Read the full file on GitHub · 334 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 334 lines · 9 tokens per session scan A 8702db2d6c20

Subscribe to this mod's changes

close-ticket is a command published in the GitHub repository WYRE-AI/msp-claude-plugins (44 stars, last pushed 3d ago), licensed Apache-2.0. It adds 9 tokens to every session and 2,140 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.