Skip to main content
Glama

pkg

Read, modify, or remove package.json fields programmatically by specifying a directory path and field name, so you can update scripts, keywords, or metadata without manual file editing.

Instructions

Manage package.json fields programmatically

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to the package directory
fieldYesField name (e.g. 'name', 'scripts.build', 'keywords')
valueNoJSON value to set; strings are literal strings, objects/arrays are accepted directly
actionYesAction to perform

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.4.0
    • addedInput schema / properties / value / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  },
      +  {
      +    "items": {},
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / value / description
      Previous value: -"Value to set (required for set action, use JSON for objects/arrays)"New value: +"JSON value to set; strings are literal strings, objects/arrays are accepted directly"
    • removedInput schema / properties / value / type
      Removed value: -"string"
  2. First observedv1.2.1

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and does not say that set/delete mutate package.json on disk, whether changes are reversible, whether a backup is made, or what errors occur on invalid paths or fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, though it is arguably too terse for a mutating tool.

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 4-parameter mutating tool with no annotations and no output schema, the description omits write behavior, return values, and failure modes, leaving the agent to infer too much.

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?

Schema coverage is 100% and the parameters are self-documenting, so the schema does the heavy lifting; the description adds no field-path syntax or value-handling context beyond what is already there.

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

Purpose3/5

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

The resource is clear (package.json fields) but the verb 'Manage' is broad, covering get/set/delete without stating which, and nothing distinguishes it from siblings like config, view, or query that could plausibly touch package metadata.

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?

No guidance on when to use this versus alternatives, no mention of prerequisites, and no exclusion of related tools such as config or version that also manipulate package data.

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