Skip to main content
Glama
r-packagedev-mcp

r-packagedev-mcp

by B0ydT

renv_snapshot

Captures current R package dependencies and writes them to renv.lock, enabling reproducible project environments.

Instructions

Record the current package dependencies into renv.lock using renv::snapshot().

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_path": "<project_path>"
    },
    "name": "renv_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoSnapshot type: 'implicit' (DESCRIPTION), 'explicit' (renv.lock packages), 'all' (everything installed), or 'custom' (default 'implicit').implicit
project_pathYesAbsolute path to the renv-managed project root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden, and it discloses only that a lockfile is written. It does not say whether existing lockfile entries are replaced or pruned, whether the operation is reversible, what permissions or initialization state are required, or what is returned. Naming renv::snapshot() helps the agent map to known semantics but is not itself disclosure.

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?

A single front-loaded sentence with no filler; the verb and target come first and the function reference trails as clarification.

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

Completeness3/5

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

For a two-parameter write tool with no annotations and no output schema, the description should cover what the write overwrites and any preconditions. Those gaps are noticeable but partially mitigated by the full schema coverage and the explicit reference to a well-documented renv function.

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 description coverage is 100%, so both project_path and the type enum are fully documented in the schema, including each enum value. The description adds no parameter meaning of its own, which is acceptable at full coverage but earns only the baseline.

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?

States a specific verb and resource: records current package dependencies into renv.lock. The parenthetical reference to renv::snapshot() pins down exactly which operation this wrappers, so an agent can distinguish it from renv_restore or renv_status on behavior, though the description never names a sibling directly.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no prerequisites are stated (e.g. that the project must already be renv-initialized, or that this should follow renv_install/renv_update). Usage is only inferable from the verb 'record' and the lockfile target.

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