Skip to main content
Glama
Repo Test Architect

Repo Test Architect

Analyze Test Placement

analyze_test_placement
Read-onlyIdempotent

Derive advisory test-placement findings for one project from an audit artifact or repo/project roots; identifies placement issues without modifying files or running tests.

Instructions

Derive advisory test-placement findings for one project; use analyze_project_test_placement for multiple audited projects. Pass an existing audit/v1 artifact, or pass repoRoot plus projectRoot to audit that project deterministically. Does not execute tests or create, move, or modify 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": "analyze_test_placement"
  }
}

Input Schema

NameRequiredDescriptionDefault
auditNoAn audit/v1 artifact; or pass repoRoot plus projectRoot instead.
ownerNoOptional owner label for the audited project. Defaults to audit.profile.root.
goTargetNo
repoRootNoRepository root to audit instead of passing audit; requires projectRoot.
projectRootNoProject root relative to repoRoot as detected, such as . or packages/api.
changedPathsNoOptional repository-relative source paths to limit target selection.

Output Schema

NameRequiredDescriptionDefault
findingsYes
auditCoverageNo
schemaVersionYes
failedProjectsNo
failedProjectCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.2.0
    • changedInput schema / properties / audit / description
      Previous value: -"The audit/v1 object returned by audit_repo or contained in projectAudits.audits[].audit; pass the artifact itself, not a file path."New value: +"An audit/v1 artifact; or pass repoRoot plus projectRoot instead."
    • 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 / 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"
      +}
    • addedInput schema / properties / projectRoot
      Added value: +{
      +  "description": "Project root relative to repoRoot as detected, such as . or packages/api.",
      +  "type": "string"
      +}
    • addedInput schema / properties / repoRoot
      Added value: +{
      +  "description": "Repository root to audit instead of passing audit; requires projectRoot.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "audit"
      -]New value: +[]
  2. Changed8 schema fields changedv1.1.0
    • removedOutput schema / $id
      Removed value: -"test-placement-findings-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/test-placement-findings-v1.schema.json in the published package."
    • addedOutput schema / properties / auditCoverage
      Added value: +{
      +  "enum": [
      +    "partial",
      +    "none"
      +  ]
      +}
    • addedOutput schema / properties / failedProjectCount
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / failedProjects
      Added value: +{
      +  "type": "array"
      +}
    • removedOutput schema / properties / findings / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "action": {
      -      "enum": [
      -        "move",
      -        "split",
      -        "keep"
      -      ]
      -    },
      -    "currentOwner": {
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "evidence": {
      -      "items": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "minItems": 1,
      -      "type": "array"
      -    },
      -    "id": {
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "reason": {
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "suggestedOwner": {
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "testFile": {
      -      "minLength": 1,
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "id",
      -    "testFile",
      -    "currentOwner",
      -    "suggestedOwner",
      -    "action",
      -    "reason",
      -    "evidence"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / title
      Removed value: -"Test Placement Findings Artifact"
  3. Changed2 schema fields changedv1.0.0
    • changedInput schema / properties / audit / description
      Previous value: -"An audit/v1 artifact."New value: +"The audit/v1 object returned by audit_repo or contained in projectAudits.audits[].audit; pass the artifact itself, not a file path."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$id": "test-placement-findings-v1.schema.json",
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "findings": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "action": {
      +            "enum": [
      +              "move",
      +              "split",
      +              "keep"
      +            ]
      +          },
      +          "currentOwner": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "evidence": {
      +            "items": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "minItems": 1,
      +            "type": "array"
      +          },
      +          "id": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "reason": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "suggestedOwner": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "testFile": {
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "testFile",
      +          "currentOwner",
      +          "suggestedOwner",
      +          "action",
      +          "reason",
      +          "evidence"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "schemaVersion": {
      +      "const": "test-placement-findings/v1"
      +    }
      +  },
      +  "required": [
      +    "schemaVersion",
      +    "findings"
      +  ],
      +  "title": "Test Placement Findings 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 readOnly, idempotent, non-open-world and non-destructive, so the safety profile is covered; the description reinforces it by enumerating what it will not do (execute tests, create/move/modify files). It adds the useful determinism signal for the repoRoot path, but omits that a target-aware verification command may run under goTarget, which is a non-obvious runtime consequence for a supposedly inert analysis tool.

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?

Two sentences, zero filler. The primary purpose and its sibling boundary come first, the input modes second, and the non-mutation disclaimer last — a correct front-loading order.

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, so return values need no explanation, and the description covers scope, sibling routing, and the required input combinations. What is missing is guidance on the optional targeting parameters (goTarget, changedPaths) and their cost, which matters for a tool with a nested object and six parameters.

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 83%, so the baseline is 3, but the description adds real meaning the schema does not encode: the mutual exclusion between audit and repoRoot+projectRoot (the schema lists no required params and no oneOf, so this constraint is invisible structurally). It says nothing about owner, changedPaths, or goTarget, leaving those entirely to the schema.

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?

"Derive advisory test-placement findings for one project" gives a specific verb (derive), a specific output (advisory test-placement findings), and a scope (one project). The next clause distinguishes it from analyze_project_test_placement (multiple audited projects), so the agent can choose between the two without opening either 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?

Explicitly routes the agent: use this for one project, use analyze_project_test_placement for multiple audited projects. It also states the two accepted invocation modes (existing audit/v1 artifact vs. repoRoot + projectRoot for a deterministic audit), which is exactly the selection decision the agent must make.

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