Skip to main content
Glama
r-packagedev-mcp

r-packagedev-mcp

by B0ydT

use_vignette

Create a new R Markdown vignette stub in vignettes/ for an R package, requiring the vignette name and package project path.

Instructions

Create a new vignette stub (Rmd file) under vignettes/ using usethis::use_vignette().

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": {
      "name": "<name>",
      "project_path": "<project_path>"
    },
    "name": "use_vignette"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesShort name/identifier for the vignette.
titleNoHuman-readable title of the vignette.
project_pathYesAbsolute path to the root of the R package.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.6/5.0
Behavior3/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. It does disclose useful behavior beyond the name by naming the created artifact type and its directory, but it omits what happens if a vignette of that name already exists, whether the vignettes/ directory is created if absent, and whether the package DESCRIPTION is modified (e.g., adding knitr to Suggests).

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, and the most important detail (what is created and where) comes first. It is arguably too terse for a mutating tool with no annotations, but nothing in the wording is wasteful.

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 file-creating mutation with three parameters and zero annotations, the definition should mention preconditions and the effect of an existing file. The 100% schema coverage compensates for parameter gaps, but the behavioral gaps leave the agent guessing about failure modes.

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%, so the schema already documents name, title, and project_path. The description adds no meaning beyond that, such as how name relates to the generated filename or what happens if title is omitted despite not being required. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource ('Create a new vignette stub (Rmd file)') plus the target location ('under vignettes/') and even the underlying implementation ('usethis::use_vignette()'). The resource is clearly distinct from siblings like use_r, use_test, and use_readme_md, so an agent can select it without opening the schema.

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?

The usage context is implied by the resource name: call this when you want a vignette scaffold in an R package. There is no explicit when/when-not guidance, no named alternative, and no stated prerequisite such as the project being a package root or needing a VignetteBuilder.

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