Skip to main content
Glama
harness

Harness MCP Server

Official
by harness

harness_diagnose

Read-only

Diagnose Harness resources by analyzing failures, testing connectivity, checking health, or troubleshooting GitOps sync issues. Auto-detects resource type from URL, defaults to pipeline execution analysis.

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 (overrides default)
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 (overrides default)
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

Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description does not need to restate safety. The description adds context about auto-detection from URLs and defaulting to pipeline diagnosis. The extensive options parameter description further details behavioral traits like log fetching in batches and capping, enhancing transparency.

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?

The main description is two sentences with no wasted words, front-loading the purpose. The options parameter description is detailed but necessary given the tool's complexity. Overall, the structure is concise and well-organized.

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?

Given the complexity (nested objects, multiple resource types) and that an output schema exists, the description is fairly complete. It covers high-level use cases and the options parameter fleshes out details. The description could be slightly more explicit about all supported resource types, but it adequately serves its purpose.

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 coverage is 100%, so the baseline is 3. The main description adds the default resource type behavior (pipeline) which is not explicit in the schema, and the options parameter description provides detailed semantics for various scenarios. However, the main description does not add significant meaning beyond what the schema already provides for most parameters.

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 clearly states the tool diagnoses Harness resources, specifying actions like analyzing failures, testing connectivity, checking health, and troubleshooting GitOps sync. It distinguishes from siblings by focusing on diagnostic actions rather than listing, getting, or modifying resources. The default to pipeline execution diagnosis and auto-detection from URL further clarify its purpose.

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 use for troubleshooting and diagnosis, and mentions defaults to pipeline execution. It also references calling harness_describe for details within the options parameter. However, it lacks explicit guidance on when to use this tool versus other siblings like harness_get or harness_execute, and does not state when not to use it.

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

Install Server

Other Tools

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