Skip to main content
Glama

Edit label

gh_edit_label
Destructive

Modify the name, color, or description of an existing GitHub label, then verify the change through a readback to ensure accuracy.

Instructions

Destructive write: edit exactly one existing label's name, color, or description after ordinary write authorization. One mutation attempt is followed by authoritative semantic readback of the resulting label; an ambiguous edit is never retried automatically. It does not delete labels or mutate issue content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesExisting label name.
repoYesGitHub repository name without the owner prefix.
colorNoReplacement six-character hexadecimal label color.
ownerYesGitHub repository owner or organization login.
new_nameNoReplacement label name.
descriptionNoReplacement label description.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
nameYes
colorNo
messageYes
warningNo
request_idNo
descriptionNo
write_completedYes
readback_completedYes
precondition_checkedYes
state_matches_requestedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed26 schema fields changedv0.8.1
    • changedInput schema / properties / color / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^[0-9A-Fa-f]{6}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / color / description
      Added value: +"Replacement six-character hexadecimal label color."
    • changedInput schema / properties / description / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 65536,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / description / description
      Added value: +"Replacement label description."
    • addedInput schema / properties / name / description
      Added value: +"Existing label name."
    • addedInput schema / properties / name / maxLength
      Added value: +100
    • addedInput schema / properties / name / minLength
      Added value: +1
    • changedInput schema / properties / new_name / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 100,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / new_name / description
      Added value: +"Replacement label name."
    • addedInput schema / properties / owner / description
      Added value: +"GitHub repository owner or organization login."
    • addedInput schema / properties / owner / maxLength
      Added value: +39
    • addedInput schema / properties / owner / minLength
      Added value: +1
    • addedInput schema / properties / owner / pattern
      Added value: +"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$"
    • addedInput schema / properties / repo / description
      Added value: +"GitHub repository name without the owner prefix."
    • addedInput schema / properties / repo / maxLength
      Added value: +100
    • addedInput schema / properties / repo / minLength
      Added value: +1
    • addedInput schema / properties / repo / pattern
      Added value: +"^[A-Za-z0-9_.-]{1,100}$"
    • changedOutput schema / description
      Previous value: -"Result of editing a label."New value: +"Authoritative outcome of one label edit attempt."
    • addedOutput schema / properties / precondition_checked
      Added value: +{
      +  "title": "Precondition Checked",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / readback_completed
      Added value: +{
      +  "title": "Readback Completed",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Request Id"
      +}
    • addedOutput schema / properties / state_matches_requested
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "State Matches Requested"
      +}
    • addedOutput schema / properties / warning
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Warning"
      +}
    • addedOutput schema / properties / write_completed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Write Completed"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "name",
      -  "url",
      -  "message"
      -]New value: +[
      +  "precondition_checked",
      +  "write_completed",
      +  "readback_completed",
      +  "state_matches_requested",
      +  "name",
      +  "url",
      +  "message"
      +]
    • changedOutput schema / title
      Previous value: -"LabelEdit"New value: +"LabelEditResult"
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds valuable behavioral details: the tool performs an authoritative semantic readback after mutation and never automatically retries ambiguous edits. It also clarifies scope (no deletion, no issue content mutation), going well beyond the annotations and providing critical safety information.

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?

The description is two sentences, front-loaded with the critical 'Destructive write' warning, and every phrase adds value. It efficiently covers the purpose, behavior, and scope without extraneous wording.

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?

The description covers the key aspects: mutation, readback, no-retry, scope, and authorization requirements. With an output schema present, return values are handled externally. Minor gap: it does not mention consequences of partial parameter updates or rate limits, but these are not essential for this tool's completeness.

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 all parameters are already documented. The description mentions the editable fields (name, color, description) but does not add new meaning about parameter interactions, constraints, or defaults beyond what the schema provides. 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 description clearly states the tool edits exactly one existing label's name, color, or description, which is a specific verb+resource+scope. It also differentiates from siblings by explicitly noting it does not delete labels or mutate issue content, distinguishing it from label deletion and issue editing tools.

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?

The description implies when to use (edit an existing label) and clarifies it does not delete labels, but it does not explicitly name alternative tools like gh_create_label. It provides context that this is for edits only and requires write authorization, but lacks explicit 'use instead of' guidance.

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