Skip to main content
Glama

Add a group from a description

limesurvey_add_group_from_spec

Insert one new group with its questions into an inactive survey, described as a group spec (the format limesurvey_get_survey_spec returns at level group; every text is one string for all survey languages or a map per language).

Instructions

Insert one new group with its questions into an inactive survey, described as a group spec (the format limesurvey_get_survey_spec returns at level group; every text is one string for all survey languages or a map per language). position is the 1-based place among the groups, { before: group_id } or { after: group_id }; without it the group goes to the end. The spec is checked against the survey first (its languages; every question code must be free in the whole survey, case ignored, because the import would rename it silently): SPEC_INVALID, CODE_CONFLICT, SURVEY_ACTIVE and POSITION_INVALID write nothing. The group is imported (import_group) with exactly the survey languages and only the new group is moved to its place; no other group is changed. It is then read back and compared with the spec. Returns { survey_id, group_id, position { index }, questions [{ code, question_id }], verification { ok, differences, differences_total, truncated }, side_effects, warnings }; a difference is a finding, not an error. If a step after the import fails, the new group is deleted again (nothing else) and ADD_GROUP_FAILED reports failed_step, rolled_back, manual_cleanup and cause_code. If the outcome of the import itself is unknown (lost answer, an unexpected answer), nothing is deleted: created is "unknown" and candidates and cleanup_hint say what to check. The .lsg import fills no translation gaps. An active survey is refused. A single question goes with limesurvey_add_question_from_spec. A Ranking question makes the tool read the LimeSurvey generation once (entries as subquestions on 7, as answers on 6). Needs the write scope content.

Input Schema

NameRequiredDescriptionDefault
groupYesThe new group as a group spec { title, description, relevance, randomization_group, questions }.
positionNo1-based place among the groups, { before: group_id } or { after: group_id }; default: the end.
survey_idYesNumeric LimeSurvey survey ID.

Output Schema

NameRequiredDescriptionDefault
resultYes
workflowYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4.6/5.0
Behavior5/5

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

With annotations only covering the safety profile, the description carries rich behavioral context: pre-import validation (languages, free question codes, case-insensitive) with named failures that write nothing, exactly what gets moved (only the new group), a read-back verification step, rollback behavior when a later step fails and the distinct no-delete path when the import outcome is unknown. That is far beyond what the annotations declare.

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?

The action and its constraints are front-loaded in the first sentence, and given the tool's failure modes most sentences earn their place. It is, however, a single dense paragraph with no visual separation between mechanics, errors, and return shape, which makes it harder to scan than its content warrants.

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?

For a destructive-capable spec import with nested objects, this is essentially complete: preconditions, validation and error codes, rollback semantics, unknown-outcome handling, scope requirement, and an unusual Ranking-question quirk. The return shape is also described even though an output schema exists, so nothing an agent needs is missing.

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 100%, so the baseline is 3, but the description adds real meaning the schema cannot: it identifies the group spec as the exact format limesurvey_get_survey_spec emits at level group, explains the one-string-or-language-map convention for every text, and clarifies that position without a value defaults to the end. These are cross-tool format contracts, not restatements.

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?

Opens with a specific verb and resource: 'Insert one new group with its questions into an inactive survey, described as a group spec.' It scopes the operation (one group, its questions, inactive survey only) and explicitly names the sibling boundary ('A single question goes with limesurvey_add_question_from_spec'), so an agent can distinguish it from add_question_from_spec and create_survey_from_spec without opening a schema.

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

Usage Guidelines4/5

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

Gives clear preconditions and routing: an active survey is refused, the spec must come from limesurvey_get_survey_spec at level group, and single questions belong to the sibling tool. It also states the required write scope. It does not, however, contrast itself with the non-spec sibling limesurvey_add_group, which is the most obvious alternative for adding a group.

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

Deploy Server

Other Tools