Available Tools

Tool groups exposed by the Trustgrid MCP server and what each tool does.

The Trustgrid MCP server organizes its tools into three groups. Each group is available at a distinct URL path, and paths can be combined to get the union of multiple groups.

Tool groups

codemode (/mcp/codemode)

The codemode group is the default when no path suffix is specified. It provides an AI code execution sandbox with full read-only access to the Trustgrid API, plus documentation search and structured resource inspection. This reduces token usage and agent turns, and allows your agent to perform complex multi-step reasoning and data retrieval in a deterministic single turn — without needing to switch back and forth between tools.

ToolDescription
searchSemantic and keyword search across Trustgrid documentation. Returns relevant excerpts with source links.
describeDescribe a codemode function. This provides the full signature to help your agent write valid code.
codeExecute sandboxed JavaScript with access to the full read-only Trustgrid API. Use for custom queries, aggregations, and bulk lookups.
followUpPaginate through results from a prior code or search call.

The code tool gives the AI direct access to all Trustgrid API endpoints within a JavaScript sandbox. It can traverse relationships, aggregate data across nodes, or do anything the REST API supports — without risking writes or configuration changes.

Codemode also includes all node diagnostic tools from the tools group.

The codemode scope requires broad read permissions. See Authentication for credential setup.

read (/mcp/read)

The read group exposes individual Trustgrid API operations as discrete MCP tools — one tool per API endpoint, roughly.

Tool familyExamplesDescription
Nodeslist_nodes, get_node, list_node_eventsNode inventory, full node records, and node event history.
Clusterslist_clusters, get_cluster, list_cluster_vpn_routesCluster inventory plus cluster VPN topology, routes, interfaces, and services.
Domainsget_domainDomain details and configuration.
Alertslist_alerts_v2, list_node_alerts_v2Active alert lists at the org or node level.
Audit logstail_config_audit, tail_node_auditConfiguration change history and node audit trails.
Eventslist_eventsPlatform event stream for the org.
VPN networkslist_node_vpn_networks, list_node_vpn_routes, list_node_vpn_servicesNode VPN topology, routes, interfaces, import/export routes, and services.
Virtual networkslist_virtual_networks, list_network_routes, list_network_objectsOverlay network configuration including routes, objects, groups, and port forwarding.
Flow logslist_flow_logsQuery network traffic flow logs with filters and pagination.

The read group requires a smaller set of OAuth scopes than codemode, making it suitable for tightly scoped service integrations.

tools (/mcp/tools)

The tools group exposes discrete, live diagnostic tools that execute directly on Trustgrid nodes. Each tool invokes a service on the node and returns the live result.

ToolDescription
get_runtime_statusNode runtime status: running services, disk usage, memory, systemd unit states.
get_network_statusNode networking: interface states, link status, assigned IP addresses as seen by the node right now.
get_dataplane_statusGateway route connectivity: which gateway routes are up or down, including per-route status.
get_errors_statusCurrently reported errors from the node. Pass startupOnly: true to filter to startup-phase errors only.
test_tcp_connectivityAttempt a TCP handshake from the node to a host:port target and report success or failure.
test_repo_connectivityVerify the node can reach its configured Trustgrid apt repositories. Reports per-repo success.
test_dns_healthTest DNS resolution against the node’s configured resolvers. Returns per-server results.
test_gateway_latencyRun a latency trace from the node to a named gateway. Returns per-hop latency measurements.
test_packet_pathSimulate a TCP packet entering the node’s virtual network and trace the path through routing and policy rules.
get_packet_captureRun a bounded tcpdump on a node interface and return captured packet lines. Accepts BPF filter expressions.

The tools group requires nodes::read plus service-specific scopes. The node does not need to be fully healthy to run most diagnostics — that’s the point.

Combining groups

Paths are combinable and order-independent. The server serves the union of all named groups:

https://mcp.trustgrid.io/mcp/codemode/read
https://mcp.trustgrid.io/mcp/read/tools
https://mcp.trustgrid.io/mcp/codemode/read/tools

Use the combined paths when your workflow needs both the code sandbox and direct per-resource tools, or when you want a single endpoint for a client that doesn’t let you configure multiple servers.

Rate limits

Limits apply per token across all requests:

GroupRequestsWindow
codemode1060 seconds
read3060 seconds
tools1060 seconds
default3060 seconds

When a limit is exceeded the server returns 429 Too Many Requests with:

  • Retry-After: <seconds> — how long to wait before retrying
  • X-RateLimit-Limit: <n> — the limit for this bucket
  • X-RateLimit-Remaining: 0 — remaining requests in the window
  • X-RateLimit-Reset: <unix timestamp> — when the window resets