Skip to main content
Glama
thehesiod

io.github.thehesiod/psquare

by thehesiod

add_class_staff

Add teachers, assistants, or room parents to a class while preserving existing staff. Assign roles and skip duplicates in one update.

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
Behavior5/5

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

With no annotations, the description carries the full burden and delivers thoroughly: it explains that existing staff are preserved, duplicates are skipped, role changes occur, room parents are guardians, and it warns about concurrency risks. It even details the internal read-then-write sequence, making the behavior highly predictable.

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 substantial but each sentence earns its place. It uses clear section headers (SAFETY, args) and front-loads the core purpose. The safety warning is detailed yet necessary due to the serious consequence of concurrent writes. The structure aids scanning and comprehension without redundancy.

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 tool's complexity (4 params, write operation, delicate concurrency), the description covers all operational aspects: prerequisites, sourcing IDs, behavior on existing data, safety constraints, and parameter details. Nothing critical is missing; the output schema likely handles return format, so the description's scope is appropriate.

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 coverage is 0%, so the description compensates completely. Every parameter is explained: section_id sources from list_classes, user_ids from list_staff/list_parents, role enumerates valid values, and class_title explains its default behavior. This gives the agent everything needed to populate arguments correctly.

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 action: 'Assign teachers, assistants, or room parents to a class.' This clearly identifies the verb, resource, and role types, and distinguishes it from sibling tools like remove_class_staff or add_class_students. The mention of 'class-staff write' further clarifies the domain.

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?

The description states the prerequisite 'Requires PS_ENABLE_WRITES' and explains when not to use in parallel with remove_class_staff, citing the risk of data loss. It also points to list_staff and list_parents for sourcing user IDs. However, it does not explicitly enumerate alternative tools for different actions (e.g., when to use remove_class_staff), leaving some inference to the agent.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thehesiod/psquare-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server