Skip to main content
Glama
r-packagedev-mcp

r-packagedev-mcp

by B0ydT

create_package

Creates a new R package skeleton at a specified path, setting up DESCRIPTION, NAMESPACE, and the R/ directory for package development.

Instructions

Create a new R package skeleton at the specified path using usethis::create_package(). Sets up DESCRIPTION, NAMESPACE, and the R/ directory.

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": {
      "path": "<path>"
    },
    "name": "create_package"
  }
}

Input Schema

NameRequiredDescriptionDefault
openNoWhether to open the new package in RStudio (default false).
pathYesAbsolute path where the new package directory should be created (e.g. '/home/user/mypackage').
fieldsNoNamed list of extra DESCRIPTION fields, e.g. {Author: 'Jane Doe', Version: '0.1.0'}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does meaningful work: it names the concrete side effects (DESCRIPTION, NAMESPACE, R/ created) and the delegating implementation (usethis::create_package()). It omits failure behavior for an existing/non-empty path, whether parent directories are created, and any other scaffolding (e.g. .Rbuildignore), which matters for a filesystem-mutating tool.

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?

Two short sentences, front-loaded with the action and path, followed by the concrete output artifacts. Every clause adds information; nothing is padding.

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 mutating scaffold tool with no annotations and no output schema, the description covers what is produced but not what happens on failure or collision with an existing directory, nor what the caller receives. Adequate to invoke correctly in the happy path, incomplete around edge cases.

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 all three parameters — path, open, and the fields map — are already documented in the schema. The description only restates that the package is created 'at the specified path' and adds no format or constraint detail beyond it, so the baseline 3 applies.

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 ('Create a new R package skeleton') plus the concrete artifacts produced (DESCRIPTION, NAMESPACE, R/ directory) and the underlying implementation. An agent can tell this is scaffolding, not a dependency-add tool like use_package. It stops short of naming any sibling explicitly.

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 implied by 'new ... skeleton' — an agent can infer this is the bootstrap step before use_r, use_testthat, or use_git. There is no explicit when-to-use statement, no warning about running it on an existing package, and no routing to alternatives.

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