Skip to main content
Glama

create_aviso_from_photo

Create a municipal incident report from a photo, with preview and required explicit confirmation before submission.

Instructions

Única herramienta para avisos, en dos fases. Para previsualizar, llama con los campos del aviso y una foto obligatoria (image_path o image_base64), sin preview_token ni campos de confirmación. La previsualización devuelve además una miniatura de la foto (imagen JPEG ≤1024 px sin EXIF, o el PNG pequeño tal cual) para que redactes la descripción y compruebes la categoría con lo visible; si omites description, devuelve phase: need_description con la miniatura y sin preview_token. Enseña el resumen exacto y espera un sí explícito. Solo entonces vuelve a llamar con únicamente preview_token, confirm:true y human_confirmed:true. Si el usuario pide cambios, crea una nueva previsualización; nunca envíes por inferencia. La previsualización no envía nada; confirmar envía un aviso real al ayuntamiento y la foto se sube únicamente durante ese envío confirmado.

Input Schema

NameRequiredDescriptionDefault
latNoLatitud; puede omitirse si la foto aporta GPS EXIF.
lngNoLongitud; puede omitirse si la foto aporta GPS EXIF.
calleIDNoID de calle; usa 0 si no se resolvió en el callejero.
confirmNoSolo true tras el sí explícito al resumen exacto.
tipoIncNoNombre del tipo de incidencia.
numCalleNoNúmero del portal, si se conoce.
tipoIncIDNoID del tipo de incidencia de list_categories.
image_pathNoRuta local de una foto JPEG o PNG dentro de los directorios permitidos (GECOR_PHOTO_DIRS; por defecto tmp, Downloads, Pictures, Desktop y ~/.hermes). Máximo 20 MB salvo GECOR_MAX_PHOTO_BYTES.
descriptionNoDescripción factual del desperfecto, redactada por el agente a partir de lo visible en la foto y lo que diga el usuario (1–2 frases; no inventes datos). Si se omite, la previsualización devuelve la miniatura para redactarla.
desUbicacionNoDirección formateada o referencia textual del lugar.
image_base64NoFoto JPEG o PNG en base64 (admite prefijo data:image/...;base64,) si no se dispone de una ruta local.
preview_tokenNoSolo para la segunda fase: token exacto devuelto por la previsualización.
tipoElementoIDNoID de elemento/subcategoría de list_categories.
desTipoElementoNoNombre del elemento/subcategoría.
human_confirmedNoSolo true tras la confirmación humana explícita.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses that the preview sends nothing, that confirming sends a REAL aviso to the city council, and that the photo is only uploaded during that confirmed send — an irreversible side effect clearly flagged. It also documents the return payload (JPEG ≤1024px sans EXIF thumbnail, or the raw small PNG, and the need_description phase).

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?

Dense but front-loaded — the two-phase nature and the preview-vs-confirm split arrive first, with the thumbnail/phase:need_description detail trailing. Some sentences run long, but each carries actionable constraints (mandatory photo, confirmation gating, no inference submission) rather than filler.

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 15-parameter mutation tool with no annotations and no output schema, the description supplies the workflow, side-effect profile, error branch, and return-value semantics an agent needs. Little is missing to call it correctly.

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 baseline is 3, but the description adds real meaning by assigning parameters to phases: which fields belong to the preview call and which (preview_token, confirm, human_confirmed) are confirmation-only. This sequencing context is not derivable from the flat 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?

Opens with a specific verb+resource in the domain's own vocabulary ('Única herramienta para avisos, en dos fases'), immediately distinguishing it from the read-only siblings (list_my_avisos, list_categories). An agent knows this is the write path for filing a report.

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 two-phase flow: preview with aviso fields + mandatory photo and no token, then confirm only with preview_token/confirm/human_confirmed. It states when-not (never submit by inference) and the recovery path (if the user requests changes, create a new preview). Nothing is left to inference.

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