Skip to main content
Glama
machship-mcp

machship-mcp

Get Companies

machship_get_companies
Read-onlyIdempotent

Retrieve all companies accessible to the authenticated user, optionally filtered by company hierarchy, to find company IDs and names for other Machship operations.

Instructions

Returns all companies accessible to the authenticated user.

Args:

  • atOrBelowCompanyId (number, optional): Filter to companies at or below this company in the hierarchy

  • response_format ('json' | 'markdown'): Output format (default: 'json')

Returns: Array of company objects, each containing: { "id": number, // Company ID — use this in other tool calls "name": string, // Display name of the company "isActive": boolean, // Whether the company is active "parentCompanyId": number | null }

Examples:

  • Use when: "List all companies I have access to"

  • Use when: "What company ID does Acme Corp have?" -> call this, then search by name

  • Don't use when: You need carrier/service info (use machship_get_company_carriers instead)

Error Handling:

  • Error 401: Check MACHSHIP_API_TOKEN is set correctly

  • Error 403: Token lacks permission to list companies

Input Schema

NameRequiredDescriptionDefault
response_formatNoOutput format: 'json' (machine-readable, default) or 'markdown' (human-readable)json
atOrBelowCompanyIdNoLimit to companies at or below this company ID in the hierarchy

Output Schema

NameRequiredDescriptionDefault
errorsNoValidation errors returned by Machship, if any
objectNoResponse payload from the Machship API

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.1
    • addedInput schema / properties / atOrBelowCompanyId / maximum
      Added value: +9007199254740991
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "errors": {
      +      "anyOf": [
      +        {
      +          "items": {},
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Validation errors returned by Machship, if any"
      +    },
      +    "object": {
      +      "description": "Response payload from the Machship API"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already declare this as read-only, idempotent, non-destructive, and open-world. The description adds useful auth-related failure behavior: 401 means check MACHSHIP_API_TOKEN, and 403 means the token lacks company-list permission. It also documents returned company fields, though the existence of an output schema makes that partly redundant.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and organized into Args, Returns, Examples, and Error Handling. It is somewhat longer than strictly necessary because the output schema already covers return fields, but the structure remains easy to scan.

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

Completeness5/5

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

For a two-parameter read-only listing tool, the description covers purpose, usage alternatives, parameter meaning, error handling, and example scenarios. With rich annotations, full schema coverage, and an output schema, an agent has everything needed to select and invoke it correctly.

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 description coverage is 100%, so the input schema already explains both parameters. The description repeats the hierarchy filter meaning for atOrBelowCompanyId and output format default for response_format without adding substantially new syntax or behavioral detail.

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?

The description states a specific verb and resource: 'Returns all companies accessible to the authenticated user.' It also explicitly distinguishes this tool from machship_get_company_carriers, which handles carrier/service information rather than company listing.

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

Usage Guidelines5/5

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

It gives concrete use cases, including listing accessible companies and resolving a company name to an ID. It also provides an explicit exclusion: don't use this for carrier/service info, use machship_get_company_carriers instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools