Declarative WebMCP: a radio group's parameter never gets a `description`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- html, javascript
Línea de trabajo
Comienza localizando la lógica declarativa que convierte formularios en esquemas de herramientas y que construye los parámetros a partir de entradas de radio agrupadas. ReproSíltelo con el <form> proporcionado e inspecciona document.modelContext.getTools() para confirmar que falta la descripción. Actualiza el manejo de los grupos de radio para usar primero toolparamdescription y, si no existe, recurrir al nombre accesible del grupo. Verifica el comportamiento con pruebas para grupos de radio y tipos de controles existentes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
A declarative tool form builds a parameter for a group of radio buttons that share a name, with each radio's
label as the title of its choice. The parameter itself never gets a description. Every other control type
we tried (text, textarea, checkbox, select, select multiple, range) takes one from toolparamdescription or
from its <label>. As a result, an agent sees the choices but not what the group is.
Reproduction
<form toolname="createProfile" tooldescription="Creates a profile.">
<fieldset>
<legend>Shift</legend>
<label><input type="radio" name="shift" value="day" toolparamdescription="Which shift they work."> Day</label>
<label><input type="radio" name="shift" value="night"> Night</label>
</fieldset>
<button type="submit">Create</button>
</form>
(await document.modelContext.getTools())[0].inputSchema.properties.shift
Expected: a description for shift. The obvious sources are toolparamdescription on a radio in the
group (or on all of them), the <legend> of the <fieldset> the group sits in, or the accessible name of an
enclosing role="radiogroup".
Actual:
{
"type": "string",
"anyOf": [
{ "type": "string", "const": "day", "title": "Day" },
{ "type": "string", "const": "night", "title": "Night" }
],
"enum": ["day", "night"]
}
None of these added a description:
toolparamdescriptionon the first radio, the second radio, or botharia-descriptionon a radioaria-descriptionon the<fieldset>- the
<fieldset>'s<legend>
It is not a stale schema. Changing toolparamdescription on a text input in the same form is reflected by the
next getTools() call, and removing and restoring toolname (re-registering the tool) did not add one either.
Suggestion: use the first toolparamdescription found among the group's radios. Failing that, fall back
to the group's accessible name: the <legend> of the nearest <fieldset>, or the label of a
role="radiogroup" ancestor. That would mirror the <label> fallback other controls already get.
- Lenguaje dominante
- Bikeshed
- Estrellas
- 4.7k
- Forks
- 328
- Merge medio
- 2 d 9 h
- PR fusionados (30 d)
- 15
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de webmachinelearning/webmcp
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
webmachinelearning/webmcp#360 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Say how an agent should weigh annotations that the page wrote about itselfPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
webmachinelearning/webmcp#353 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
webmachinelearning/webmcp#343 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Agenda+ i18n-tracker
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
webmachinelearning/webmcp#273 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
a11y-tracker Agenda+
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
webmachinelearning/webmcp#272 · 4 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de webmachinelearning/webmcp
Issues similares
-
Wrong label on save role buttonAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
killbill/killbill-admin-ui#673 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cloudflare/vinext#4301 ·
Los mantenedores suelen responder en 1 día
-
bug Frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
nextcloud/cookbook#3497 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
farion1231/cc-switch#8863 · 1 comentario ·
Los mantenedores suelen responder en 1 día