Skip to content
Development
Command

/search-clients

Search for HaloPSA clients by name, domain, or other attributes

From plugin
msp-claude-plugins
39200 skills141 agents200 commands
Install
$ npx -y skills add wyre-technology/msp-claude-plugins --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/search-clients

Context preview

What this command does when you run it.

Search for HaloPSA clients by name, domain, or other attributes

Command definition

search-clients.md
description: Search for HaloPSA clients by name, domain, or other attributes
argument-hint: "<query> [client_type] [active] [include_sites] [limit]"
arguments: [query, client_type, active, include_sites, limit]

Search HaloPSA Clients

Search for HaloPSA clients by name, domain, or other attributes for quick lookups.

Prerequisites

  • Valid HaloPSA OAuth credentials configured
  • User must have client read permissions

Steps

1. **Authenticate with OAuth 2.0**

  • Obtain access token using client credentials flow
  • Token endpoint: `{base_url}/auth/token?tenant={tenant}`
   # Get OAuth token
   TOKEN=$(curl -s -X POST "{base_url}/auth/token?tenant={tenant}" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "grant_type=client_credentials" \
     -d "client_id={client_id}" \
     -d "client_secret={client_secret}" \
     -d "scope=all" | jq -r '.access_token')

2. **Build search query**

  • Apply search term
  • Apply type filter if specified
  • Apply active filter

3. **Execute client search**

   curl -s -X GET "{base_url}/api/Client?search={query}&page_size={limit}" \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json"

4. **Fetch sites (if requested)**

   # For each client, fetch sites
   curl -s -X GET "{base_url}/api/Site?client_id={client_id}" \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json"

5. **Format and display results**

  • Client list with key details
  • Site information if requested
  • Quick action links

Parameters

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | query | string | Yes | - | Search term (name, domain, partial) | | client_type | string | No | - | Customer/Prospect/Vendor | | active | boolean | No | true | Active clients only | | include_sites | boolean | No | false | Include site details | | limit | integer | No | 10 | Maximum results (max 100) |

Examples

Basic Search

/search-clients "Acme"

Search by Domain

/search-clients "acme.com"

Customer Type Only

/search-clients "Acme" --client_type Customer

Include Sites

/search-clients "Acme Corp" --include_sites true

Include Inactive

/search-clients "Old Company" --active false

Limit Results

/search-clients "Tech" --limit 25

Vendor Search

/search-clients "Microsoft" --client_type Vendor

Output

Standard Results

Found 3 clients matching "Acme"

┌─────────┬────────────────────────┬──────────────┬────────────┬───────────┐
│ ID      │ Name                   │ Type         │ Status     │ Domain    │
├─────────┼────────────────────────┼──────────────┼────────────┼───────────┤
│ 123     │ Acme Corporation       │ Customer     │ Active     │ acme.com  │
│ 124     │ Acme Industries        │ Customer     │ Active     │ acmei.com │
│ 125     │ Acme Labs LLC          │ Prospect     │ Active     │ acmelabs.io│
└─────────┴────────────────────────┴──────────────┴────────────┴───────────┘

Quick Actions:
- View client:    /search-clients --id <id>
- Client tickets: /search-tickets --client <id>
- Create ticket:  /create-ticket <id> "Summary"

With Sites

Found 2 clients matching "Acme Corp"

================================================================================
Acme Corporation (ID: 123)
================================================================================
Type:         Customer
Status:       Active
Domain:       acme.com
Phone:        +1 555-123-4567
Address:      123 Main Street, New York, NY 10001

Contract:     Managed Services Agreement (Active)
SLA:          Premium
Account Mgr:  John Manager

Sites (3):
┌─────────┬──────────────────────┬────────────────────────────────┬───────────┐
│ ID      │ Name                 │ Address                        │ Primary   │
├─────────┼──────────────────────┼────────────────────────────────┼───────────┤
│ 456     │ Main Office          │ 123 Main St, New York, NY      │ Yes       │
│ 457     │ West Coast Office    │ 456 Oak Ave, Los Angeles, CA   │ No        │
│ 458     │ Remote Workers       │ Various Locations              │ No        │
└─────────┴──────────────────────┴────────────────────────────────┴───────────┘

Users: 47 active contacts
Assets: 156 managed devices

--------------------------------------------------------------------------------

================================================================================
Acme Industries (ID: 124)
================================================================================
Type:         Customer
Status:       Active
Domain:       acmei.com
Phone:        +1 555-987-6543
Address:      789 Industrial Way, Chicago, IL 60601

Contract:     Pay-As-You-Go
SLA:          Standard
Account Mgr:  Jane Manager

Sites (1):
┌─────────┬──────────────────────┬────────────────────────────────┬───────────┐
│ ID      │ Name                 │ Address                        │ Primary   │
├─────────┼──────────────────────┼────────────────────────────────┼───────────┤
│ 459     │ Headquarters         │ 789 Industrial Way, Chicago    │ Yes       │
└─────────┴──────────────────────┴────────────────────────────────┴───────────┘

Users: 23 active contacts
Assets: 45 managed devices

================================================================================

Detailed Client View

================================================================================
Client Details: Acme Corporation
================================================================================

BASIC INFORMATION
--------------------------------------------------------------------------------
ID:               123
Name:             Acme Corporation
Type:             Customer
Status:           Active
Created:          2022-01-15

CONTACT INFORMATION
---------------------------------------
Read more
Ships withmsp-claude-plugins

One command to supercharge Claude Code for MSP workflows. Then restart Claude Code. That's it. Documentation: mcp.wyre.ai

Get the whole plugin, auto-invoked
Stats
39
Stars
0
Views
17
Forks
Active
Maintenance
Astro
Language
Apache-2.0
License
1d ago
Last commit
6mo ago
Created

Repo: wyre-technology/msp-claude-plugins