Skip to main content
Glama
piyushgIITian

GitHub Enterprise MCP Server

update-repository

Modify GitHub repository settings including description, privacy, default branch, and enable/disable features like issues, projects, wiki, or archive status.

Instructions

Update an existing GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
archivedNoArchive/unarchive repository
default_branchNoChange default branch
descriptionNoNew description
has_issuesNoEnable/disable issues
has_projectsNoEnable/disable projects
has_wikiNoEnable/disable wiki
ownerYesRepository owner
privateNoChange privacy setting
repoYesRepository name

Implementation Reference

  • The main execution handler for the 'update-repository' tool. Parses arguments using Zod schema, uses GitHub Octokit to update repository settings, wraps in error handling, and returns updated repository details.
    export async function updateRepository(args: unknown): Promise<any> {
      const {
        owner,
        repo,
        description,
        private: isPrivate,
        default_branch,
        has_issues,
        has_projects,
        has_wiki,
        archived,
      } = UpdateRepositorySchema.parse(args);
      const github = getGitHubApi();
    
      return tryCatchAsync(async () => {
        const { data } = await github.getOctokit().repos.update({
          owner,
          repo,
          description,
          private: isPrivate,
          default_branch,
          has_issues,
          has_projects,
          has_wiki,
          archived,
        });
    
        return {
          id: data.id,
          name: data.name,
          full_name: data.full_name,
          private: data.private,
          description: data.description,
          html_url: data.html_url,
          default_branch: data.default_branch,
          has_issues: data.has_issues,
          has_projects: data.has_projects,
          has_wiki: data.has_wiki,
          archived: data.archived,
          updated_at: data.updated_at,
        };
      }, 'Failed to update repository');
    }
  • src/server.ts:152-197 (registration)
    MCP tool registration defining the 'update-repository' tool's metadata, description, and input schema for the server.
    {
      name: 'update-repository',
      description: 'Update an existing GitHub repository',
      inputSchema: {
        type: 'object',
        properties: {
          owner: {
            type: 'string',
            description: 'Repository owner',
          },
          repo: {
            type: 'string',
            description: 'Repository name',
          },
          description: {
            type: 'string',
            description: 'New description',
          },
          private: {
            type: 'boolean',
            description: 'Change privacy setting',
          },
          default_branch: {
            type: 'string',
            description: 'Change default branch',
          },
          has_issues: {
            type: 'boolean',
            description: 'Enable/disable issues',
          },
          has_projects: {
            type: 'boolean',
            description: 'Enable/disable projects',
          },
          has_wiki: {
            type: 'boolean',
            description: 'Enable/disable wiki',
          },
          archived: {
            type: 'boolean',
            description: 'Archive/unarchive repository',
          },
        },
        required: ['owner', 'repo'],
        additionalProperties: false,
      },
  • Zod validation schema for 'update-repository' tool inputs, extending OwnerRepoSchema with optional update fields. Used in the handler for argument parsing.
    export const UpdateRepositorySchema = OwnerRepoSchema.extend({
      description: z.string().optional(),
      private: z.boolean().optional(),
      default_branch: z.string().optional(),
      has_issues: z.boolean().optional(),
      has_projects: z.boolean().optional(),
      has_wiki: z.boolean().optional(),
      archived: z.boolean().optional(),
    });
  • Dispatch case in the MCP server's tool request handler that routes 'update-repository' calls to the updateRepository function.
    case 'update-repository':
      result = await updateRepository(parsedArgs);
      break;
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Update' implies a mutation operation, the description doesn't specify what permissions are required, whether changes are reversible, what happens to unspecified fields, or any rate limits. For a mutation tool with 9 parameters and zero annotation coverage, this leaves significant behavioral questions unanswered.

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 a single, efficient sentence that states the core purpose without any wasted words. It's appropriately sized for a tool with a clear primary function and doesn't bury important information in unnecessary verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 9 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address authentication requirements, error conditions, what the tool returns, or behavioral constraints. The agent would need to guess about many important aspects of using this tool effectively.

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?

The schema description coverage is 100%, with all 9 parameters clearly documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and target resource ('an existing GitHub repository'), making the purpose immediately understandable. It distinguishes this from creation tools like 'create-repository' by specifying 'existing', but doesn't explicitly differentiate from other update tools like 'update-issue' or 'update-pull-request-branch' beyond the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (like authentication needs), when to choose this over other repository modification tools, or any constraints on usage. The agent must infer usage from the tool name alone.

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/piyushgIITian/github-enterprice-mcp'

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