Skip to main content
Glama

Editar oferta

update_offer

Replace all fields of a classroom offer (name, type, value, courses, validity, and seats) in one call; fetch offers first and use set_offer_active to change active status.

Instructions

[Administrador del aula] Reemplaza los datos de una oferta del aula (nombre, tipo, valor, cursos, vigencia y cupos). Envía todos los campos, no solo lo que cambia; consulta list_offers primero. El estado activo/pausado no cambia: usa set_offer_active.

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": {
      "classroom_id": "<classroom_id>",
      "offer_id": "<offer_id>",
      "name": "<name>",
      "kind": "<kind>",
      "course_ids": "<course_ids>"
    },
    "name": "update_offer"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesTipo de oferta
nameYesNombre de la oferta
amountNoValor en la moneda de la plataforma, para monto, precio_fijo y paquete
ends_atNoFin en ISO 8601
percentNoPorcentaje, para porcentaje y segundo_curso
offer_idYesOferta
starts_atNoInicio en ISO 8601
course_idsYes
max_claimsNoCupos
descriptionNoDescripción visible
classroom_idYesAula

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnly=false, destructive=false and openWorld=false. The description adds real value by disclosing full-replacement semantics and the untouched active flag, but it leaves the consequence of omitted optional fields implicit (are they cleared or preserved?) rather than stating it outright.

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?

Three short sentences, front-loaded with the role tag, the action, then the two key constraints. Nothing is redundant, though the parenthetical field list partially duplicates what the schema already enumerates.

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

Completeness4/5

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

For an 11-parameter mutation tool with no output schema, the description covers the critical risks: full-value replacement, read-before-write, and scoping away the status field. Minor gaps remain around validation or failure behavior for a nonexistent offer.

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 description coverage is 91%, so the baseline is 3, but the description goes beyond field naming by spelling out that every field must be supplied rather than only deltas - a calling convention the schema alone does not convey. It does not restate the conditional amount/percent-per-kind logic, which the schema already handles.

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?

Specific verb ("Reemplaza" / replaces) plus resource ("oferta del aula") and an enumeration of the fields it governs, which lets an agent distinguish it from create_offer and set_offer_active immediately.

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?

Explicitly states prerequisite (consult list_offers first), how to call it (send all fields, not only the changed ones), and hands off the sibling concern (active/paused state is out of scope, use set_offer_active). Both when-to-use and when-not-to-use are covered.

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