Skip to main content
Glama
harness

Harness MCP Server

Official
by harness

harness_diagnose

Read-only

Diagnose Harness resource failures and health issues. Analyze pipeline failures, test connector/delegate connectivity, and troubleshoot GitOps sync problems automatically from a resource URL.

Instructions

Diagnose a Harness resource — analyze failures, test connectivity, check health, or troubleshoot GitOps sync issues. Defaults to pipeline execution diagnosis. Accepts a Harness URL to auto-detect the resource type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoA Harness URL — resource type, org, project, and ID are extracted automatically
org_idNoOrganization identifier. Required for org- and project-scoped resources unless a Harness URL is passed. This session has no configured default (common in hosted/multi-user HTTP) — pass the current org_id on the first call. Do not omit it.
optionsNoResource-specific diagnostic options. Pipeline: execution_id, pipeline_id, summary, include_yaml, include_logs, include_all_step_logs (boolean, fetch logs for ALL steps not just failed/deepest — logs are fetched in batches of 3 for memory safety, capped at max_all_step_logs, use for pipeline summarization), max_all_step_logs (number, default 25, max steps to include in all_step_logs — prevents OOM on large matrix/loop pipelines), return_download_url (boolean, return signed logs.zip URLs instead of inline log text), log_snippet_lines, max_failed_steps. Pipeline diagnosis requires a completed execution. When a Harness URL contains ?step=<nodeExecutionId>, setting include_logs:true fetches that specific step's log regardless of pass/fail status and returns it as requested_step_log alongside any failed_step_logs. GitOps: agent_id. Call harness_describe for details.
project_idNoProject identifier. Required for project-scoped resources unless a Harness URL is passed. This session has no configured default (common in hosted/multi-user HTTP) — pass the current project_id on the first call. Do not omit it.
resource_idNoPrimary identifier of the resource (connector ID, delegate name). Auto-detected from url if provided.
resource_typeNoResource type to diagnose. Auto-detected from url if provided. Defaults to pipeline.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv3.2.22
    • changedInput schema / properties / org_id / description
      Previous value: -"Organization identifier (overrides default)"New value: +"Organization identifier. Required for org- and project-scoped resources unless a Harness URL is passed. This session has no configured default (common in hosted/multi-user HTTP) — pass the current org_id on the first call. Do not omit it."
    • changedInput schema / properties / project_id / description
      Previous value: -"Project identifier (overrides default)"New value: +"Project identifier. Required for project-scoped resources unless a Harness URL is passed. This session has no configured default (common in hosted/multi-user HTTP) — pass the current project_id on the first call. Do not omit it."
  2. Changed1 schema field changedv3.2.16
    • changedInput schema / properties / options / description
      Previous value: -"Resource-specific diagnostic options. Pipeline: execution_id, pipeline_id, summary, include_yaml, include_logs, return_download_url (boolean, return signed logs.zip URLs instead of inline log text), log_snippet_lines, max_failed_steps. Pipeline diagnosis requires a completed execution. When a Harness URL contains ?step=<nodeExecutionId>, setting include_logs:true fetches that specific step's log regardless of pass/fail status and returns it as requested_step_log alongside any failed_step_logs. GitOps: agent_id. Call harness_describe for details."New value: +"Resource-specific diagnostic options. Pipeline: execution_id, pipeline_id, summary, include_yaml, include_logs, include_all_step_logs (boolean, fetch logs for ALL steps not just failed/deepest — logs are fetched in batches of 3 for memory safety, capped at max_all_step_logs, use for pipeline summarization), max_all_step_logs (number, default 25, max steps to include in all_step_logs — prevents OOM on large matrix/loop pipelines), return_download_url (boolean, return signed logs.zip URLs instead of inline log text), log_snippet_lines, max_failed_steps. Pipeline diagnosis requires a completed execution. When a Harness URL contains ?step=<nodeExecutionId>, setting include_logs:true fetches that specific step's log regardless of pass/fail status and returns it as requested_step_log alongside any failed_step_logs. GitOps: agent_id. Call harness_describe for details."
  3. First observedv3.2.10

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already carry the safety profile (readOnlyHint=true, destructiveHint=false), so the description only needs to add behavioral context — which it does by disclosing URL-based auto-detection of resource type and the pipeline-execution default. The schema's options text further discloses consequential behavior: pipeline diagnosis requires a completed execution, all-step logs are fetched in batches of 3 with a memory cap, and ?step= URLs trigger targeted single-step log retrieval. No contradiction with annotations; openWorldHint aligns with the connectivity-testing behavior.

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

Conciseness5/5

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

Three sentences with zero filler and the most decision-relevant fact (what the tool does) front-loaded first. The purpose list, the default behavior, and the URL-acceptance capability each earn their place and are ordered from broad purpose to specific behavior to input mechanism.

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

Completeness4/5

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

For a complex tool with six parameters and a nested options object, the combination of description, rich schema, and annotations gives an agent everything needed to invoke it correctly. An output schema exists, so return-value documentation is not required. The main description doesn't enumerate supported resource types, but the resource_type enum covers that, and the only real gap is the absence of sibling-routing guidance.

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%, and each parameter description is unusually rich: url explains auto-extraction, org_id/project_id warn there is no configured default and instruct the agent to pass them on the first call, and options documents nested behaviors like log batching and memory caps. The main description only repeats the url auto-detection concept already present in the resource_type and resource_id parameter descriptions, adding no new semantic value. The baseline 3 applies because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (Diagnose) and a clear resource scope, enumerating four concrete purposes (analyze failures, test connectivity, check health, troubleshoot GitOps sync). The default-to-pipeline statement adds further specificity and helps distinguish it from search/get/describe siblings. It loses a point because 'a Harness resource' is generic and it never explicitly contrasts itself with harness_status, which could plausibly overlap with 'check health.'

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

Usage Guidelines3/5

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

The description implies the diagnostic use case through its purpose list and states the default path (pipeline execution diagnosis), giving an agent a sense of when to call it. However, it offers no explicit when-not-to-use guidance and no comparison against harness_status or harness_search, which an agent might reasonably confuse with this tool. The single pointer to harness_describe lives inside the schema's options description rather than the main description.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/harness/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server