Skip to main content
Glama

Update Self

localnest_update_self

Update the LocalNest MCP server globally via npm and synchronize bundled skills. Supports stable, beta, or specific version targets with explicit user approval.

Instructions

Update localnest-mcp globally via npm and sync bundled skill. Supports stable, beta, or explicit version targets. Requires explicit user approval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
approved_by_userNo
dry_runNo
versionNolatest
reinstall_skillNo
response_formatNojson

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaNo

Implementation Reference

  • The selfUpdate method within UpdateService handles the actual npm update and skill synchronization logic, including a dry-run mode and an explicit user approval requirement.
      async selfUpdate({ approvedByUser = false, dryRun = false, version = 'latest', reinstallSkill = true } = {}) {
        if (!approvedByUser) {
          return {
            ok: false,
            skipped: true,
            reason: 'approval_required',
            message: 'User approval is required. Ask: "LocalNest has a newer version. Update now?"'
          };
        }
    
        const installStep = buildInstallCommand(this.packageName, version);
        const skillStep = buildSkillSyncCommand();
        const planned = [
          [installStep.command, ...installStep.args].join(' '),
          reinstallSkill ? [skillStep.command, ...skillStep.args].join(' ') : null
        ].filter(Boolean);
    
        if (dryRun) {
          const validation = this.buildDryRunValidation({ reinstallSkill, version });
          return {
            ok: validation.ok,
            skipped: true,
            dry_run: true,
            validation,
            planned_commands: planned,
            restart_required: true
          };
        }
    
        const installResult = this.runCommand(installStep.command, installStep.args);
        if (!installResult.ok) {
          return {
            ok: false,
            step: 'npm_install',
            restart_required: false,
            planned_commands: planned,
            install: installResult
          };
        }
    
        let skillResult = null;
        if (reinstallSkill) {
          skillResult = this.runCommand(skillStep.command, skillStep.args);
          if (!skillResult.ok) {
            return {
              ok: false,
              step: 'skill_sync',
              restart_required: false,
              planned_commands: planned,
              install: installResult,
              skill_sync: skillResult
            };
          }
        }
    
        const status = await this.getStatus({ force: true, channel: normalizeUpdateChannel(version) || 'stable' });
        return {
          ok: true,
          step: 'completed',
          restart_required: true,
          planned_commands: planned,
          install: installResult,
          skill_sync: skillResult,
          update_status: status
        };
      }
    }
  • Registration of the 'localnest_update_self' tool in the core tools registry, which calls the updates.selfUpdate service method.
    registerJsonTool(
      ['localnest_update_self'],
      {
        title: 'Update Self',
        description: 'Update localnest-mcp globally via npm and sync bundled skill. Supports stable, beta, or explicit version targets. Requires explicit user approval.',
        inputSchema: {
          approved_by_user: z.boolean().default(false),
          dry_run: z.boolean().default(false),
          version: z.string().default('latest'),
          reinstall_skill: z.boolean().default(true)
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
          openWorldHint: true
        }
      },
      async ({ approved_by_user, dry_run, version, reinstall_skill }) => normalizeUpdateSelfResult(
        await updates.selfUpdate({
          approvedByUser: approved_by_user,
          dryRun: dry_run,
          version,
          reinstallSkill: reinstall_skill
        })
      )
    );
Behavior4/5

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

Adds crucial context beyond annotations: user approval requirement, npm as the mechanism, and skill synchronization side effects. Annotations indicate it's not read-only and affects external world (openWorldHint), but description explains the actual user consent flow and bundled skill behavior.

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 sentences with zero waste: action/mechanism first, version options second, critical safety requirement third. Every clause provides unique information not replicated in schema or annotations.

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?

Adequate for a complex self-update operation given existing output schema (not shown but indicated) and annotations. Covers approval flow, version targeting, and side effects. Could be improved by mentioning failure behavior or rollback capabilities.

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?

With 0% schema description coverage, description partially compensates by implying semantics for 'version' (stable/beta/explicit), 'approved_by_user' (explicit approval), and 'reinstall_skill' (sync bundled skill). However, 'dry_run' and 'response_format' remain undocumented, creating gaps the description doesn't fill.

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 ('Update') + resource ('localnest-mcp') + mechanism ('via npm') + side effect ('sync bundled skill'). Clearly distinguishes from siblings (all other tools operate on code/projects; this is the only self-modification tool).

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?

States critical requirement ('Requires explicit user approval') and version targeting options ('stable, beta, or explicit'). Lacks explicit 'when not to use' but no siblings offer similar functionality, making alternatives unnecessary.

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/wmt-mobile/localnest'

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