Skip to main content
Glama
r-packagedev-mcp

r-packagedev-mcp

by B0ydT

renv_restore

Restore packages from renv.lock to recreate the recorded R environment with renv::restore(), optionally rebuilding packages from source.

Instructions

Restore packages from renv.lock to recreate the recorded environment using renv::restore().

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_restore"
  }
}

Input Schema

NameRequiredDescriptionDefault
rebuildNoWhether to rebuild packages from source (default false).
project_pathYesAbsolute path to the renv-managed project root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, yet it says nothing about the fact that restore mutates the project library and can overwrite currently installed package versions, nor about permissions, duration, or failure behavior. Mentioning renv::restore() helps agents familiar with R but is not behavioral disclosure.

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 the action first and the mechanism second; no filler. It is efficient, though the brevity leaves no room for the safety context a mutating tool needs.

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?

With only two fully documented parameters and no output schema, the definition covers enough to invoke the tool correctly. It falls short on what the operation changes in the environment and what it returns, which matters for a mutation tool with no annotations.

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 rebuild are already documented in the schema; the baseline of 3 applies. The description adds only marginal meaning, implying that the lockfile lives at the project_path root.

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 ('Restore packages from renv.lock') and names the underlying call renv::restore(), so the action is unambiguous. It does not explicitly contrast with sibling tools like renv_snapshot or renv_install, so an agent must infer the boundary.

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?

Usage is only implied through the phrase 'recreate the recorded environment', which suggests the post-clone / lockfile-changed scenario. There is no explicit when-to-use, when-not-to-use, or named alternative such as renv_snapshot for the inverse operation.

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