Skip to main content
Glama

Prepare Work Item Brief

prepare_work_item
Read-onlyIdempotent

Generate a risk-aware implementation brief for any GitHub issue, combining evidence, policy, and history to produce explainable risk assessment, defensive requirements, and rollback plans.

Instructions

Generate a risk-aware implementation brief for a GitHub issue. The brief combines bounded Issue/comment evidence, repository policy, confirmed package scripts, related paths, and recent PR history to produce explainable risk, defensive requirements, negative scenarios, rollback, observability, and a safe handoff prompt.

Args:

  • owner, repo: Repository coordinates.

  • issueNumber (number): The issue to prepare.

  • includeRelatedFiles (boolean): Heuristically list related file paths. Default: false. Explicit paths are checked on the default branch, actual adjacent tests are discovered with bounded naming conventions, and CODEOWNERS are attached when available.

  • includeRecentPRs (boolean): Scan recent merged PRs (up to 20) for ones that touched the related file hints and return up to 5 matches. Requires includeRelatedFiles to find hints to match against — if no hints exist, returns an empty list. Default: false. This opt-in deep scan is bounded but can use up to 61 additional sequential GitHub requests (one PR candidate page plus up to three file pages for each of 20 candidates).

  • includeDependencies (boolean): Read official blocked-by, blocking, sub-issue, and timeline cross-reference endpoints, capped at 20 items per source. Default: false.

  • workType (string?): Explicit docs/feature/bugfix/refactor/security/release/infra type.

  • riskLevel (string?): Explicit minimum low/medium/high/critical risk. Repository policy can raise it.

Returns: Structured risk profile and source evidence, issue/derived acceptance criteria, defensive requirements, negative scenarios, verified repository commands, rollback/observability plans, bounded history metadata, and Markdown safe for agent consumption. Issue and comment text remain untrusted evidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoGitHub repo. Falls back to GITHUB_REPO.
ownerNoGitHub owner. Falls back to GITHUB_OWNER.
workTypeNoExplicit work type. When omitted, deterministic issue/policy signals are used.
riskLevelNoExplicit minimum risk level. Repository policy may raise but never lower it.
issueNumberYesThe GitHub issue number.
includeRecentPRsNoInclude recent merged PRs touching related files.
includeDependenciesNoInclude bounded official sub-issue, blocked-by, blocking, and cross-reference evidence.
includeRelatedFilesNoAttempt to identify related files from issue body keywords.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
stateYes
titleYes
labelsYes
blockersYes
workTypeYes
assigneesYes
milestoneYes
recentPRsYes
issueNumberYes
riskProfileYes
dependenciesYes
manualChecksYes
relatedFilesYes
rollbackPlanYes
handoffPromptYes
sourceEvidenceYes
commentEvidenceYes
evidenceWarningsYes
relatedFileHintsYes
commentsTruncatedYes
negativeScenariosYes
observabilityPlanYes
acceptanceCriteriaYes
needsClarificationYes
parallelizableWorkYes
workTypeConfidenceYes
recentPRsIncompleteYes
verificationCommandsYes
defensiveRequirementsYes
relatedFilesIncompleteYes
dependencyEvidenceIncompleteYes
Behavior5/5

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

Annotations provide readOnlyHint, idempotentHint, and non-destructive nature. The description adds significant behavioral context: cost of includeRecentPRs (up to 61 requests), bounded scans, data sources, and that output includes untrusted evidence. No contradiction with annotations.

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?

The description is well-structured with a clear summary and enumerated args. It is slightly long but each sentence provides value. Minor redundancy in the args list (e.g., repeated defaults) but overall efficient.

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?

Given the tool's complexity (8 parameters, output schema exists), the description covers all aspects: purpose, argument semantics, usage costs, and return content. No gaps remain.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds substantial meaning: fallback behavior for owner/repo, default deterministic inference for workType and riskLevel, and detailed explanations of boolean toggles (e.g., dependency between includeRelatedFiles and includeRecentPRs). This far exceeds baseline.

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's purpose: 'Generate a risk-aware implementation brief for a GitHub issue.' It uses specific verbs and resources, and the sibling tools list shows differentiation (e.g., plan_from_context, review_pr_against_standard).

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?

While the description explains what the tool does and its parameters in detail, it does not explicitly state when to use this tool over siblings or when not to use it. There is no mention of alternatives or exclusion criteria.

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/SakuraCianna/agentic-sdlc-mcp'

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