Skip to main content
Glama

Diagnose TSLink

doctor
Read-onlyIdempotent

Runs local TSLink diagnostics to find why a share or URL is not working, inspecting config, registry, credentials metadata, and runtime state without writing changes.

Instructions

Run local TSLink diagnostics and return findings by severity. Use this when a share or URL is not working and status was not enough; it inspects local config, registry, credentials metadata and runtime state, writes nothing, and reports health_exit_code instead of failing. A reduced MCP role gets only the status reader's daemon state and health findings for its apps, with withheld naming the omitted fields.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "doctor"
  }
}

Input Schema

NameRequiredDescriptionDefault
probe_externalNoAlso attempt a short TCP connection to non-loopback service targets. Leave false unless the user asked to test reachability of a remote backend.

Output Schema

NameRequiredDescriptionDefault
pathsYesResolved config, registry, runtime snapshot, auth handoff and PID paths.
alertsNoRecent alert events and masked notifier status.
countsYesService count plus finding counts by severity.
daemonYesWhether the local TSLink daemon is running, and its PID when it is.
portalNoHome portal state and exact URL.
statusYes
findingsYes
node_keysNo
access_logNoLocal access-log health: last_write, drops, size_bytes and error.
credentialsNoStored credential expiry with metadata provenance.
guest_linksNo
supervisionNoVerified OS supervision, autostart, restart policy, and diagnostic evidence.
health_statusYes
tailscale_sshYesTailscale SSH enablement for this node, read from the local Tailscale client: state is enabled, disabled, or unknown, and acl_rule_required records that a tailnet ACL ssh rule is also needed. Informational only; it never changes health_status or health_exit_code.
schema_versionYes
credential_modeYes
credential_tierYes
execution_statusYes
health_exit_codeYesExit code `tslink doctor` would return for this health status. It is reported, not applied: the tool result itself is successful.
runtime_snapshotYesFreshness classification of runtime.json against the current daemon and registry fingerprint.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/openWorld annotations: it names exactly what is inspected (local config, registry, credentials metadata, runtime state), confirms nothing is written, and discloses two non-obvious behaviors — returning health_exit_code rather than failing, and role-scoped output where withheld fields are named. The reduced-role caveat is the kind of context an agent cannot get from annotations.

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?

Three sentences, front-loaded with purpose then trigger then behavior; every clause carries information (scope, safety, failure mode, role restrictions). The second and third sentences are long and compound, slightly taxing to parse, but nothing is filler.

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?

An output schema exists, so return values need not be explained, and the description still covers the important return-side behavior (findings by severity, health_exit_code, withheld fields). For a one-parameter diagnostic tool this leaves no material question unanswered.

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?

The single parameter probe_external is fully documented in the schema (100% coverage), including its default and the condition for setting it true. The description adds no parameter-level meaning, so the schema carries this dimension and the baseline 3 applies.

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?

States a specific verb and resource ("Run local TSLink diagnostics") and the output shape ("findings by severity"). It also implicitly separates itself from the 'status' sibling by saying it is for when "status was not enough", so an agent can distinguish it without opening the schema.

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?

Gives a clear triggering condition: a share or URL is not working and status was insufficient. It names one alternative (status) as a prerequisite step but does not exclude other plausible siblings such as health or access_explain, so routing is clear but not exhaustive.

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