Skip to main content
Glama
r28ai

GitHub + Linear Dev Workflows

by r28ai

github_repos_create_or_update_file

Create a new file or replace an existing GitHub repository file in one commit. For updates, pass the existing file SHA; omit it when creating.

Instructions

Create a file or replace an existing one, in a single commit. Write the content as plain text. To replace a file, read it first and pass its sha; without one GitHub treats this as a create and refuses if the path exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaNoThe blob SHA of the file being replaced. Required when updating an existing file, omitted when creating a new one.
pathYesPath to the file, relative to the repository root.
repoYesThe name of the repository without the `.git` extension. The name is not case sensitive.
ownerYesThe account owner of the repository. The name is not case sensitive.
authorNoWho wrote the change, if not the committer.
branchNoThe branch to commit to. Absent, the default branch.
contentYesPlain text content
messageYesThe commit message.
committerNoWho made the commit. Absent, the authenticated user.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare that this writes and is open-world; the description adds real behavioral detail beyond that — the single-commit semantics, plain-text content requirement, and the specific failure mode when an existing path is targeted without a sha. Auth/permission requirements and rate limits remain unstated.

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?

Three short sentences, front-loaded with the core action, followed by the content format and the critical create-vs-update rule. No filler.

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?

For a 9-parameter mutation tool with no output schema, the description covers the create/update distinction, content format, and the main error condition. Branch, author, and committer behavior are left to the schema, which documents them adequately, so nothing essential is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds workflow meaning the schema does not: that the caller should read the file first to obtain the `sha`, and that `content` must be plain text. The sha semantics are corroborated but the 'read first' procedure is genuinely additive.

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 ('Create a file or replace an existing one') with the scope modifier 'in a single commit'. An agent can immediately distinguish this from read tools like github_repos_get_content or commit-list tools among the siblings.

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 an explicit conditional: to replace a file, read it first and pass its `sha`; without one GitHub treats it as a create and refuses if the path exists. This is clear when/when-not guidance, though it does not name alternative sibling tools for the same task.

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

Deploy Server

Other Tools