Skip to main content
Glama
Repo Test Architect

Repo Test Architect

Collect Project Stats

collect_project_stats
Read-onlyIdempotent

Aggregates coverage, counts, risk and signal distributions, frameworks, and adapter usage from an audit artifact or fresh repo audit; returns project-stats/v1 without running tests or writing files.

Instructions

Aggregate coverage, counts, risk and signal distributions, frameworks, and adapter usage from a project-audits/v1 artifact or, with repoRoot, from a fresh audit. Use this for separate reporting or comparisons; review_repository already includes the same stats. Returns project-stats/v1 without executing tests or writing files.

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": "collect_project_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
goTargetNo
repoRootNoRepository root to audit instead of passing projectAudits.
changedPathsNoOptional repository-relative source paths to limit target selection.
projectAuditsNoA project-audits/v1 artifact; or pass repoRoot instead.
excludeProjectRootsNoOptional project roots or subtree patterns such as examples/** to exclude before auditing.

Output Schema

NameRequiredDescriptionDefault
rootYes
countsYes
summaryYes
adaptersYes
sourceFilesYes
distributionsYes
schemaVersionYes
failedProjectsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.2.0
    • addedInput schema / properties / changedPaths
      Added value: +{
      +  "description": "Optional repository-relative source paths to limit target selection.",
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / excludeProjectRoots
      Added value: +{
      +  "description": "Optional project roots or subtree patterns such as examples/** to exclude before auditing.",
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / goTarget
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "goarch": {
      +      "description": "Explicit GOARCH for bounded Go build-constraint evaluation.",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "goos": {
      +      "description": "Explicit GOOS for bounded Go build-constraint evaluation.",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "tags": {
      +      "description": "Optional custom Go build tags passed to the target-aware verification command.",
      +      "items": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "goos",
      +    "goarch"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / projectAudits / description
      Previous value: -"The project-audits/v1 object returned by audit_projects; pass the artifact itself, not a file path."New value: +"A project-audits/v1 artifact; or pass repoRoot instead."
    • addedInput schema / properties / repoRoot
      Added value: +{
      +  "description": "Repository root to audit instead of passing projectAudits.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "projectAudits"
      -]New value: +[]
  2. Changed20 schema fields changedv1.1.0
    • removedOutput schema / $defs
      Removed value: -{
      -  "countRecord": {
      -    "additionalProperties": {
      -      "minimum": 0,
      -      "type": "integer"
      -    },
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / $id
      Removed value: -"project-stats-v1.schema.json"
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / description
      Added value: +"Top-level shape of this artifact. The complete contract is schemas/project-stats-v1.schema.json in the published package."
    • removedOutput schema / properties / adapters / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "adapterId": {
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "projectCount": {
      -      "minimum": 0,
      -      "type": "integer"
      -    }
      -  },
      -  "required": [
      -    "adapterId",
      -    "projectCount"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / properties / counts / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / counts / properties
      Removed value: -{
      -  "blockerCount": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "coveredButRiskyCount": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "riskCount": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "skippedTargetCount": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "untestedCandidateCount": {
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / counts / required
      Removed value: -[
      -  "untestedCandidateCount",
      -  "coveredButRiskyCount",
      -  "skippedTargetCount",
      -  "riskCount",
      -  "blockerCount"
      -]
    • removedOutput schema / properties / distributions / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / distributions / properties
      Removed value: -{
      -  "confidence": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "evidenceKinds": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "evidenceStrengths": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "evidenceUsage": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "evidenceViaUsage": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "riskLevels": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "signals": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "targetKinds": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "testCommands": {
      -    "$ref": "#/$defs/countRecord"
      -  },
      -  "testFrameworks": {
      -    "$ref": "#/$defs/countRecord"
      -  }
      -}
    • removedOutput schema / properties / distributions / required
      Removed value: -[
      -  "confidence",
      -  "testFrameworks",
      -  "testCommands",
      -  "targetKinds",
      -  "riskLevels",
      -  "signals",
      -  "evidenceStrengths",
      -  "evidenceKinds",
      -  "evidenceUsage",
      -  "evidenceViaUsage"
      -]
    • addedOutput schema / properties / failedProjects
      Added value: +{
      +  "type": "array"
      +}
    • removedOutput schema / properties / root / minLength
      Removed value: -1
    • removedOutput schema / properties / sourceFiles / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / sourceFiles / properties
      Removed value: -{
      -  "audited": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "byLanguage": {
      -    "additionalProperties": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "audited": {
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "total": {
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "unsupported": {
      -          "minimum": 0,
      -          "type": "integer"
      -        }
      -      },
      -      "required": [
      -        "total",
      -        "audited",
      -        "unsupported"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "object"
      -  },
      -  "total": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "unsupported": {
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / sourceFiles / required
      Removed value: -[
      -  "total",
      -  "audited",
      -  "unsupported",
      -  "byLanguage"
      -]
    • removedOutput schema / properties / summary / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / summary / properties
      Removed value: -{
      -  "auditCoverage": {
      -    "enum": [
      -      "complete",
      -      "partial",
      -      "none"
      -    ]
      -  },
      -  "auditedProjectCount": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "projectCount": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "unsupportedProjectCount": {
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / summary / required
      Removed value: -[
      -  "projectCount",
      -  "auditedProjectCount",
      -  "unsupportedProjectCount",
      -  "auditCoverage"
      -]
    • removedOutput schema / title
      Removed value: -"Project Stats Artifact"
  3. Changed2 schema fields changedv1.0.0
    • changedInput schema / properties / projectAudits / description
      Previous value: -"A project-audits/v1 artifact."New value: +"The project-audits/v1 object returned by audit_projects; pass the artifact itself, not a file path."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "countRecord": {
      +      "additionalProperties": {
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "$id": "project-stats-v1.schema.json",
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "adapters": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "adapterId": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "projectCount": {
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "adapterId",
      +          "projectCount"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "counts": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "blockerCount": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "coveredButRiskyCount": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "riskCount": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "skippedTargetCount": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "untestedCandidateCount": {
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "untestedCandidateCount",
      +        "coveredButRiskyCount",
      +        "skippedTargetCount",
      +        "riskCount",
      +        "blockerCount"
      +      ],
      +      "type": "object"
      +    },
      +    "distributions": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "confidence": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "evidenceKinds": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "evidenceStrengths": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "evidenceUsage": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "evidenceViaUsage": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "riskLevels": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "signals": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "targetKinds": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "testCommands": {
      +          "$ref": "#/$defs/countRecord"
      +        },
      +        "testFrameworks": {
      +          "$ref": "#/$defs/countRecord"
      +        }
      +      },
      +      "required": [
      +        "confidence",
      +        "testFrameworks",
      +        "testCommands",
      +        "targetKinds",
      +        "riskLevels",
      +        "signals",
      +        "evidenceStrengths",
      +        "evidenceKinds",
      +        "evidenceUsage",
      +        "evidenceViaUsage"
      +      ],
      +      "type": "object"
      +    },
      +    "root": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "schemaVersion": {
      +      "const": "project-stats/v1"
      +    },
      +    "sourceFiles": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "audited": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "byLanguage": {
      +          "additionalProperties": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "audited": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "total": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "unsupported": {
      +                "minimum": 0,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "total",
      +              "audited",
      +              "unsupported"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "object"
      +        },
      +        "total": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "unsupported": {
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "total",
      +        "audited",
      +        "unsupported",
      +        "byLanguage"
      +      ],
      +      "type": "object"
      +    },
      +    "summary": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "auditCoverage": {
      +          "enum": [
      +            "complete",
      +            "partial",
      +            "none"
      +          ]
      +        },
      +        "auditedProjectCount": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "projectCount": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "unsupportedProjectCount": {
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "projectCount",
      +        "auditedProjectCount",
      +        "unsupportedProjectCount",
      +        "auditCoverage"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "schemaVersion",
      +    "root",
      +    "summary",
      +    "sourceFiles",
      +    "counts",
      +    "distributions",
      +    "adapters"
      +  ],
      +  "title": "Project Stats Artifact",
      +  "type": "object"
      +}
  4. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the bar is lower, yet the description still adds that no tests are executed and no files are written — a non-obvious guarantee for an audit tool. It stops short of noting cost/latency differences between reading a stored artifact and triggering a fresh audit, or any failure conditions.

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 tight sentences: what it aggregates, the two source modes, then the routing caveat and the return contract. Zero filler and the aggregation scope is front-loaded.

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?

Output schema exists and the description still names the returned artifact (project-stats/v1), annotations cover the safety profile, and all five params are documented at 80% coverage. The only gap is operational: no hint that a fresh audit is heavier than parsing a supplied artifact.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, so the baseline is 3, but the description adds real meaning: repoRoot is not merely an alternative input, it triggers a fresh audit, which the schema only states flatly as "audit instead." goTarget, changedPaths and excludeProjectRoots are left entirely to the schema, which is acceptable given their documented descriptions.

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?

Names a specific verb (aggregate) plus the exact contents (coverage, counts, risk/signal distributions, frameworks, adapter usage) and the two input sources (project-audits/v1 artifact or fresh audit via repoRoot). An agent can distinguish it from siblings like collect_project_findings or summarize_project_audits 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 Guidelines5/5

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

States the use case positively ("separate reporting or comparisons") and explicitly names the alternative that already covers this ground ("review_repository already includes the same stats"), which functions as the when-not condition. The routing decision is fully inferable from the description alone.

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