Skip to main content
Glama

move

Change GitHub pull request status to attention, waiting, shelved, or auto states to manage open source contribution workflow.

Instructions

Move a PR between states: attention (need attention), waiting (waiting on maintainer), shelved (hidden), or auto (reset to computed status).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prUrlYesFull GitHub PR URL
targetYesTarget state for the PR

Implementation Reference

  • The implementation of the `runMove` function, which handles the logic for transitioning a PR between states (attention, waiting, shelved, or auto).
    export async function runMove(options: { prUrl: string; target: string }): Promise<MoveOutput> {
      validateUrl(options.prUrl);
      validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR');
    
      const target = options.target as MoveTarget;
      if (!VALID_TARGETS.includes(target)) {
        throw new Error(`Invalid target "${options.target}". Must be one of: ${VALID_TARGETS.join(', ')}`);
      }
    
      const stateManager = getStateManager();
    
      switch (target) {
        case 'attention':
        case 'waiting': {
          const status = target === 'attention' ? 'needs_addressing' : 'waiting_on_maintainer';
          const label = target === 'attention' ? 'Need Attention' : 'Waiting on Maintainer';
          // Use current time — the CLI doesn't have cached PR data. The override
          // will auto-clear on the next daily run if the PR has new activity after this.
          const lastActivityAt = new Date().toISOString();
          stateManager.batch(() => {
            stateManager.setStatusOverride(options.prUrl, status, lastActivityAt);
            stateManager.unshelvePR(options.prUrl);
          });
          return { url: options.prUrl, target, description: `Moved to ${label}` };
        }
        case 'shelved': {
          stateManager.batch(() => {
            stateManager.shelvePR(options.prUrl);
            stateManager.clearStatusOverride(options.prUrl);
          });
          return {
            url: options.prUrl,
            target,
            description: 'Shelved — excluded from capacity and actionable items',
          };
        }
        case 'auto': {
          stateManager.batch(() => {
            stateManager.clearStatusOverride(options.prUrl);
            stateManager.unshelvePR(options.prUrl);
          });
          return {
            url: options.prUrl,
            target,
            description: 'Reset to computed status',
          };
        }
        default: {
          const _exhaustive: never = target;
          throw new Error(`Unhandled move target: ${_exhaustive}`);
        }
      }
    }
  • The `MoveOutput` interface defining the structure of the data returned by the move operation.
    export interface MoveOutput {
      url: string;
      target: MoveTarget;
      /** Human-readable description of what happened. */
      description: string;
    }
  • The MCP tool registration for the 'move' command, which binds the 'move' tool to the `runMove` handler and defines its Zod input schema.
    // 20. move — Move a PR between states
    server.registerTool(
      'move',
      {
        description:
          'Move a PR between states: attention (need attention), waiting (waiting on maintainer), shelved (hidden), or auto (reset to computed status).',
        inputSchema: {
          prUrl: z.string().describe('Full GitHub PR URL'),
          target: z.enum(['attention', 'waiting', 'shelved', 'auto']).describe('Target state for the PR'),
        },
        annotations: { readOnlyHint: false, destructiveHint: false },
      },
      wrapTool(runMove),
    );
Behavior4/5

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

Annotations declare write-operation (readOnlyHint:false) and non-destructive nature. The description adds valuable behavioral semantics: what 'attention', 'waiting', 'shelved', and 'auto' actually mean operationally (e.g., 'auto' resets to computed status). Does not mention idempotency or error conditions.

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?

Single sentence, front-loaded with action. Zero waste: every clause either specifies the resource, the action, or defines a state value. Perfect density.

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?

With 100% schema coverage, 2 simple parameters, and no output schema, the description provides sufficient completeness for invocation. Minor gap: doesn't mention validation behavior (e.g., idempotency, invalid state transitions).

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%, but the description adds crucial semantic explanations for the enum values in the 'target' parameter (e.g., explaining 'shelved' means 'hidden' and 'auto' means 'reset'). This meaning is not present in the schema's bare enum list.

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?

Specific verb ('Move') + resource ('PR') + complete scope (four states listed). The parenthetical state definitions implicitly distinguish this general-purpose mover from siblings like 'shelve' that only handle specific states.

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?

No explicit when-to-use or when-not-to-use guidance compared to sibling 'shelve'. However, by exhaustively listing the four valid target states, usage is implied—you know this is the canonical state transition tool.

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/costajohnt/oss-autopilot'

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