Skip to main content
Glama

set_keyword

Change one keyword in an existing BPP control file, then lint the file again. Preserves layout and comments; refuses multi-line values.

Instructions

Change one keyword in a control file, then lint the file again.

Use this for every edit to an existing control file; never edit one by hand. Look up the keyword's syntax with lookup_docs first, and ask the user before changing a scientific choice.

  • keyword: a control-file keyword, checked against the manual's list.

  • value: everything after the =, on one line, e.g. "200000" for nsample or "invgamma 3 0.002" for thetaprior.

The keyword's line is replaced where it stands (layout and comments are kept); a keyword the file does not have yet is added at the end. A value that spans several lines in the file (such as species&tree) is refused: remake the file with make_control_file instead.

Returns the lint_control_file result for the edited file, plus server.changed (keyword, old, new; old is null if it was unset). Read server.status as usual, and run smoke_test again once it is "valid".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ctlYes
valueYes
keywordYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give the safety profile (readOnly=false, destructive=false, openWorld=false); the description adds substantial behavior: in-place line replacement with comments/layout preserved, append-at-end for missing keywords, refusal of multiline values, and the returned lint result plus server.changed fields and follow-up smoke_test step.

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?

Front-loaded core action in the first sentence, then prerequisites, then parameter notes, then return/next-step behavior. Multi-paragraph length is justified by real content, though the return-value paragraph could be tightened slightly.

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

Completeness5/5

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

No output schema exists, so the description carries the return contract (lint_control_file result, server.changed with keyword/old/new) and the next step (check server.status, re-run smoke_test). It also covers the main failure mode (multiline value) and the redirect to make_control_file.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and there are no enums, so the description must carry parameter meaning: it explains that keyword is validated against the manual's list and gives concrete value examples ('200000' for nsample, 'invgamma 3 0.002' for thetaprior). The ctl parameter, however, is never explicitly described beyond being 'a control file'.

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+resource: 'Change one keyword in a control file, then lint the file again.' It clearly distinguishes itself from the file-creating/upgrading siblings by scoping to edits of existing control files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ('Use this for every edit to an existing control file; never edit one by hand'), sequences prerequisites (lookup_docs first, ask user before scientific choices), and names an alternative (make_control_file) for the multiline case it refuses.

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