Skip to main content
Glama

Get Repository Context

repo_context
Read-onlyIdempotent

Gather baseline GitHub repository context—metadata, README, package.json, tech stack, workflows, governance, open issues, and PRs—before planning or creating SDLC work items.

Instructions

Read baseline context for a GitHub repository, including metadata, README summary, package.json summary, tech stack, common scripts, workflow file names, governance signals, agent instruction file summaries, open issues, and open PRs.

Use this tool at the start of any SDLC workflow to understand the codebase before planning or creating work items.

Args:

  • owner (string?): GitHub org or user. Defaults to GITHUB_OWNER env var.

  • repo (string?): Repository name. Defaults to GITHUB_REPO env var.

  • includeReadme (boolean): Include truncated README. Default: true.

  • includePackageJson (boolean): Include package.json summary, detected package manager, tech stack, and common scripts. Default: false.

  • includeWorkflows (boolean): Include .github/workflows/*.yml file names. Default: false.

  • includeAgentInstructions (boolean): Include summaries of AGENTS.md/CLAUDE.md if present. Default: false.

  • includeGovernance (boolean): Include whether a CODEOWNERS file exists. Default: false.

  • includePolicy (boolean): Include validated repository policy and provenance. Default: false.

  • includeOpenIssues (boolean): Include recent open issues. Default: false.

  • includeOpenPRs (boolean): Include open pull requests. Default: false.

  • issueLimit (number): Max open issues to fetch. Default: 20, max: 100.

  • prLimit (number): Max open PRs to fetch. Default: 20, max: 100.

  • maxReadmeChars (number): Max README characters before truncation. Default: 3000.

  • maxInstructionChars (number): Max characters per agent instruction file summary. Default: 1000.

Returns: Markdown summary of the repository context, plus structured content. Missing files (README, package.json, agent instructions) degrade gracefully rather than failing the whole call.

Input Schema

NameRequiredDescriptionDefault
repoNoGitHub repo name. Falls back to GITHUB_REPO env var.
ownerNoGitHub owner (org or user). Falls back to GITHUB_OWNER env var.
prLimitNoMax number of open PRs to fetch when includeOpenPRs is true. Default: 20, max: 100.
issueLimitNoMax number of open issues to fetch when includeOpenIssues is true. Default: 20, max: 100.
includePolicyNoInclude the validated .agentic-sdlc.yml policy summary, rule IDs, digest, and source ref/SHA.
includeReadmeNoInclude a truncated README summary.
includeOpenPRsNoInclude a list of open pull requests (up to 20).
maxReadmeCharsNoMax README characters before truncation. Default: 3000.
includeWorkflowsNoInclude `.github/workflows/*.yml` file names (names only, not permissions -- use workflow_permissions_audit for that).
includeGovernanceNoInclude lightweight governance signals (currently: whether a CODEOWNERS file exists). For full branch protection details, use branch_protection_status.
includeOpenIssuesNoInclude a list of recent open issues (up to 20).
includePackageJsonNoInclude a package.json summary, detected package manager, tech stack, and common scripts.
maxInstructionCharsNoMax characters per agent instruction file summary before truncation. Default: 1000.
includeAgentInstructionsNoInclude summaries of agent instruction files (AGENTS.md, CLAUDE.md) if present at the repo root.

Output Schema

NameRequiredDescriptionDefault
policyNo
topicsYes
openPRsNo
scriptsNo
fullNameYes
languageYes
pushedAtYes
techStackNo
workflowsNo
governanceNo
openIssuesNo
visibilityYes
descriptionYes
policyDigestNo
policyErrorsNo
defaultBranchYes
policySourcesNo
readmeSummaryNo
trustBoundaryNo
packageManagerNo
policyWarningsNo
openIssuesCountYes
stargazersCountYes
agentInstructionsNo
appliedPolicyRulesNo
packageJsonSummaryNo
promptInjectionWarningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.11.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed2 schema fields changedv1.9.0
    • addedOutput schema / properties / promptInjectionWarnings
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "categories": {
      +        "items": {
      +          "enum": [
      +            "instruction_override",
      +            "role_impersonation",
      +            "tool_coercion",
      +            "secret_exfiltration",
      +            "data_exfiltration",
      +            "encoded_instruction"
      +          ],
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "severity": {
      +        "enum": [
      +          "medium",
      +          "high"
      +        ],
      +        "type": "string"
      +      },
      +      "source": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "source",
      +      "severity",
      +      "categories"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / trustBoundary
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "callerAndRepositoryContent": {
      +      "const": "untrusted",
      +      "type": "string"
      +    },
      +    "instructionHandling": {
      +      "const": "never_execute",
      +      "type": "string"
      +    },
      +    "permissionHandling": {
      +      "const": "never_expand",
      +      "type": "string"
      +    },
      +    "secretHandling": {
      +      "const": "never_reveal",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "callerAndRepositoryContent",
      +    "instructionHandling",
      +    "secretHandling",
      +    "permissionHandling"
      +  ],
      +  "type": "object"
      +}
  3. Changed7 schema fields changedv1.8.0
    • addedInput schema / properties / includePolicy
      Added value: +{
      +  "default": false,
      +  "description": "Include the validated .agentic-sdlc.yml policy summary, rule IDs, digest, and source ref/SHA.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / appliedPolicyRules
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "source": {
      +        "const": "repository",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "source"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / policy
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "defaultWorkType": {
      +      "enum": [
      +        "docs",
      +        "feature",
      +        "bugfix",
      +        "refactor",
      +        "security",
      +        "release",
      +        "infra"
      +      ],
      +      "type": "string"
      +    },
      +    "degraded": {
      +      "type": "boolean"
      +    },
      +    "found": {
      +      "type": "boolean"
      +    },
      +    "protectedPaths": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "releaseBlockingLabels": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "requireChangelog": {
      +      "type": "boolean"
      +    },
      +    "requireCodeOwnersForProtectedPaths": {
      +      "type": "boolean"
      +    },
      +    "requireIssueLink": {
      +      "type": "boolean"
      +    },
      +    "requireRollbackPlan": {
      +      "type": "boolean"
      +    },
      +    "requiredChecks": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "appId": {
      +            "exclusiveMinimum": 0,
      +            "maximum": 9007199254740991,
      +            "type": "integer"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "source": {
      +            "const": "check_run",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "source",
      +          "appId"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "requiredReviewerRuleIds": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "riskRuleIds": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "schemaVersion": {
      +      "const": 1,
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "found",
      +    "degraded",
      +    "schemaVersion",
      +    "requiredChecks",
      +    "protectedPaths",
      +    "riskRuleIds",
      +    "requiredReviewerRuleIds",
      +    "releaseBlockingLabels",
      +    "requireIssueLink",
      +    "requireCodeOwnersForProtectedPaths",
      +    "requireChangelog",
      +    "requireRollbackPlan"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / policyDigest
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / policyErrors
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / policySources
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "blobSha": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "digest": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "enum": [
      +          "default",
      +          "repository"
      +        ],
      +        "type": "string"
      +      },
      +      "path": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "ref": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "path",
      +      "ref",
      +      "blobSha",
      +      "digest"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / policyWarnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  4. First observedv1.5.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuine value by noting that missing files 'degrade gracefully rather than failing the whole call,' which an agent cannot infer from the annotations alone.

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?

Purpose and usage are front-loaded in the first two sentences, and the Returns note is useful. The Args block duplicates the schema field-for-field, which is mildly redundant, but the overall structure is scannable and earns most of its length.

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?

For a 14-parameter read tool with an output schema and full annotation coverage, the description is complete: it lists scope, usage timing, and graceful-degradation behavior. Return format is covered by the output schema, so nothing essential is missing.

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%, so the schema already documents every parameter including defaults, bounds, and cross-references (e.g., workflow_permissions_audit, branch_protection_status). The description's Args list largely restates the schema rather than adding new semantics, so the baseline of 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 ('Read baseline context for a GitHub repository') and enumerates exactly what is returned (metadata, README, package.json, tech stack, workflows, governance, issues, PRs). This lets an agent distinguish it from siblings like plan_from_context or create_issue_set without opening a 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 explicit placement guidance: 'Use this tool at the start of any SDLC workflow to understand the codebase before planning or creating work items.' That establishes when to reach for it relative to planning/work-item siblings, though it names no explicit exclusion or alternative.

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