Skip to main content
Glama

Close a GitHub issue

github_issue_close
DestructiveIdempotent

Close a GitHub issue with a reason (completed, not planned, or duplicate), optionally posting a comment and notifying followers; already-closed issues are left unchanged.

Instructions

Close an issue with a reason: completed, not_planned or duplicate (duplicate_of names the original, in the same forms as an issue). The comment, if any, is posted as it closes, and the people following the issue are notified. An issue that is closed already is left as it is: nothing is sent, the comment is not posted, changed is false and state_reason is its current reason. An issue is 12, #12, owner/repo#12 or its URL; a bare number means the working tree's repository, or repo.

Input Schema

NameRequiredDescriptionDefault
repoNoowner/name; defaults to the working tree's repository (its origin). Used for a bare number.
issueYesThe issue, as 12, #12, owner/repo#12 or its URL.
reasonYesWhy it is closed.
commentNoA comment to post as the issue closes.
duplicate_ofNoWith reason duplicate: the issue it duplicates, as 12, #12, owner/repo#12 or its URL.

Output Schema

NameRequiredDescriptionDefault
repoYes
issueYes
changedYesFalse when the issue was closed already and nothing was sent.
foreignYes
state_reasonYesThe reason the issue is closed with now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructive, idempotent and openWorld, so the bar is lower, yet the description still adds real behavior: the comment is posted as the issue closes, followers are notified, and an already-closed issue yields nothing sent, no comment posted, changed=false and the current state_reason. That is exactly the side-effect and idempotency detail an agent needs before a destructive call.

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?

Front-loaded with the operation and its reasons, then side effects, then the no-op case, then identifier syntax — a sensible priority order. The final identifier-forms sentence duplicates schema text and could be trimmed, but nothing else is wasted.

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 destructive, idempotent mutation with an output schema present, the description covers reasons, dependent parameter behavior, side effects, notification, and the no-op return shape. Nothing needed to call it correctly 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 coverage is 100% and every description sentence about identifier forms (12, #12, owner/repo#12, URL) and about repo applying to a bare number restates what the schema already documents. The only added nuance is that duplicate_of takes the same forms, which is also essentially in the schema, so the baseline of 3 is appropriate.

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 opening clause gives a specific verb and resource (close an issue) plus the exact enum of reasons, which cleanly separates it from siblings like github_issue_reopen and github_issue_edit. An agent can identify the operation and its valid modes 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 Guidelines4/5

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

It explains the selection logic among reasons, including that duplicate requires duplicate_of to name the original, and it defines the already-closed no-op case so the agent knows calling again is harmless. It stops short of naming an explicit alternative (e.g. reopen) or stating when not to use this tool, so it is strong context rather than full routing guidance.

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