Skip to main content
Glama
jasonko
by jasonko

add_class_staff

Add teachers, assistants, or room parents to a class, preserving current staff. Provide section ID, user IDs, and role to update the roster.

Instructions

Assign teachers, assistants, or room parents to a class. Requires PS_ENABLE_WRITES.

SAFETY: Never call this tool or remove_class_staff in parallel, even for different sections. ParentSquare replaces the full staff list, and concurrent writes have caused unrelated associations to disappear. The server serializes calls within this process; still use one call at a time and verify with a fresh get_class read before the next class-staff write.

The class's existing staff are read first and preserved — only the listed people are added, all in a single update. Anyone already holding the role is skipped; anyone on the class under a different role is moved to this one. Room parents are ordinary guardians: get their user_id from list_parents. Teachers and assistants come from list_staff.

Args: section_id: Class/section ID (from list_classes) user_ids: One or more user IDs (list_staff for staff, list_parents for room parents) role: One of TEACHER, ASSISTANT, ROOM_PARENT — applied to everyone in user_ids class_title: Optional label shown on the class (defaults to the role name)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYes
user_idsYes
section_idYes
class_titleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral disclosure burden, and it does so thoroughly. It discloses the concurrency hazard, the fact that the server replaces the full staff list internally, the preservation of existing staff, deduplication of current roles, and role-transfer behavior for people on a different role. It also includes the required environment flag and the instruction to serialize with read verification.

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?

The description is appropriately structured: a one-sentence purpose, a critical safety note, detailed concurrency guidance, and a clean Args breakdown. Every sentence conveys non-redundant information, and the matching risk is placed prominently before more detailed parameter documentation.

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?

Given the presence of an output schema and the tool's complexity, the description covers everything required to invoke it correctly: required permission flag, concurrency constraints, where to get IDs, role values, and behavior for existing associations. The return format is not described, but the presence of an output schema satisfies that requirement.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate and almost perfectly does. It maps section_id to list_classes, user_ids to list_staff or list_parents (depending on role), explicitly enumerates the accepted role values, and clarifies that class_title is an optional label defaulting to the role name. This adds valuable source and value semantics beyond the bare schema.

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?

The description opens with a specific verb-resource pairing: 'Assign teachers, assistants, or room parents to a class,' which clearly states what the tool does and the types of roles it handles. The explicit mention of preserving existing staff and contrasting with remove_class_staff differentiates it from sibling tools without requiring schema inspection.

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?

It provides strong when-to-use context: it is for adding staff roles, requires PS_ENABLE_WRITES, and should never be called concurrently with remove_class_staff. It even instructs verifying with a fresh get_class read before the next class-staff write. It does not explicitly say 'for removing staff use remove_class_staff,' but that is strongly implied by the add/preserve semantics.

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