Skip to main content
Glama

Prepare Work Item Brief

prepare_work_item
Read-onlyIdempotent

Generate a risk-aware implementation brief for a GitHub issue, combining evidence and policy to produce defensive requirements, negative scenarios, rollback, and observability 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
trustBoundaryNo
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 already declare readOnly, openWorld, idempotent, non-destructive. The description adds resource cost details (e.g., up to 61 requests for includeRecentPRs) and clarifies that issue/comment text is untrusted, going well beyond 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 lengthy but every sentence provides value, with a clear opening, detailed parameter list, and explicit return sections. Minor redundancy like 'bounded' repetition could be tightened.

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?

With 8 parameters, 1 required, and an output schema present, the description covers all parameter behaviors, constraints, return structure, and risk considerations without omissions.

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 critical context: includeRecentPRs depends on includeRelatedFiles, includeDependencies is capped, and workType/riskLevel can be overridden by policy. This adds significant meaning beyond 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?

The description clearly states 'Generate a risk-aware implementation brief for a GitHub issue' – a specific verb-resource combination that distinguishes it from siblings like plan_from_context or repo_context.

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 the tool is used for generating a brief before implementation, but does not explicitly state when to use or when to prefer sibling tools like plan_from_context.

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