Skip to main content
Glama

update_all_last_editors

Update @last-editor fields in all files using Git author information to maintain accurate contributor tracking.

Instructions

Update @last-editor fields in all files with Git author information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that scans all .ts files, checks for @last-editor, updates them using git history via updateLastEditorInFile, and returns results for each file.
    async updateAllLastEditors(): Promise<Array<{file: string, success: boolean, newEditor?: string, reason?: string}>> {
      try {
        // Find all TypeScript files with @last-editor
        const pattern = path.join(this.projectRoot, '**/*.ts');
        const files = glob.sync(pattern, { ignore: ['**/node_modules/**', '**/dist/**'] });
        
        const results = [];
        
        for (const file of files) {
          try {
            const content = await fs.readFile(file, 'utf8');
            if (content.includes('@last-editor')) {
              const result = await this.updateLastEditorInFile(file);
              results.push({
                file: path.relative(this.projectRoot, file),
                ...result
              });
            }
          } catch (error) {
            results.push({
              file: path.relative(this.projectRoot, file),
              success: false,
              reason: `Error reading file: ${error}`
            });
          }
        }
        
        return results;
      } catch (error) {
        console.error('Error updating all last editors:', error);
        return [{ file: 'all', success: false, reason: `Error: ${error}` }];
      }
    }
  • src/index.ts:757-764 (registration)
    Tool registration in the MCP server's tools list, defining name, description, and empty input schema (no parameters required).
    {
      name: 'update_all_last_editors',
      description: 'Update @last-editor fields in all files with Git author information',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • MCP tool request handler case that invokes gitUtils.updateAllLastEditors(), computes summary statistics, and returns formatted response.
    case 'update_all_last_editors': {
      const results = await this.gitUtils.updateAllLastEditors();
      const summary = {
        updated: results.filter(r => r.success).length,
        skipped: results.filter(r => !r.success).length,
        details: results
      };
      return { content: [{ type: 'text', text: `Updated ${summary.updated} files, skipped ${summary.skipped} files. Details: ${JSON.stringify(summary.details, null, 2)}` }] };
    }
  • Input schema definition for the tool (empty object, no required parameters).
    inputSchema: {
      type: 'object',
      properties: {}
    }
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. It states the tool performs updates (implying mutation) but doesn't describe what 'update' entails—whether it overwrites existing data, requires specific permissions, has side effects, or provides any response format. This is inadequate for a mutation tool with zero annotation coverage.

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 front-loads the core action ('Update @last-editor fields') and target. There is no wasted verbiage, making it easy for an agent to parse quickly.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'Git author information' entails, how the update is performed, what happens on failure, or what (if anything) is returned. Given the complexity of updating all files, more context is needed.

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?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description adds value by explaining the tool's purpose without needing to compensate for missing param info, earning a baseline score above the minimum.

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 @last-editor fields') and the target ('in all files with Git author information'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from its sibling 'update_last_editor' (which likely updates a single file), leaving some ambiguity about scope.

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 like 'update_last_editor' or 'update_file_metadata'. It lacks context about prerequisites, timing, or exclusions, leaving the agent to infer usage scenarios.

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/keleshteri/mcp-memory'

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