Skip to content

Expose the missing settings blocks in the MCP OPTIONS catalogue #263

Description

@bastien-gallay

Ce qu'on veut

termherd-mcp's OPTIONS catalogue (crates/mcp/src/lib.rs) exposes eight
options: theme, shell.program, shell.args, and the five
terminal.colors.* slots. Five settings blocks that have shipped since are
absent, so list_options under-reports what settings.json accepts and
set_option cannot reach them:

Pourquoi

The catalogue's own doc-comment says it is "kept small for this first draft",
which was honest when it held the only two blocks that existed. It now
under-reports by five, and the gap is invisible from the tool itself: a session
asking list_options gets a complete-looking answer.

The OptionSpec contract already carries what each needs — a JSON Pointer, a
kind, and choices for an enum — so this is filling a table, not designing
one. close.* is the enum case (alwaysConfirm / confirmWhenActive /
noConfirmation); the rest are scalars. keys stays out: it is a map, not a
pointer to a value, and would need a different shape.

The read side already degrades on a bad value, so set_option writing an
out-of-range number is contained — Settings clamps at load.

How this surfaced

Found during the wrap pass that followed #257: the feature shipped without its
block appearing either in the README or in the catalogue. #262 fixes the
README; the catalogue needs this issue.

Activity

  1. added
    area:mcp
    area:config
    on Aug 3, 2026
  2. changed the title [-]Exposer les blocs de réglages manquants dans le catalogue MCP `OPTIONS`[/-] [+]Expose the missing settings blocks in the MCP `OPTIONS` catalogue[/+] on Aug 3, 2026
  3. bastien-gallay commented on Aug 4, 2026

    @bastien-gallay
    CollaboratorAuthor

    Two more keys landed outside the catalogue: terminal.copy_on_select and
    terminal.paste_on_right_click (#36). OPTIONS in crates/mcp/src/lib.rs
    still carries the same eight ids, so an agent asking "what can I configure
    here?" gets an answer that omits them.

    The prose side is already reconciled, in #276: the file-only sentence in
    docs/src/reference/settings.md and its twin in docs/src/mcp/stdio.md now
    name both keys. Whoever picks this up should expect to edit those two
    sentences back the other way — they are the enumeration that says what MCP
    cannot write, and they have to stay in lockstep with OPTIONS.

  4. bastien-gallay commented on Sep 17, 2026

    @bastien-gallay
    CollaboratorAuthor

    Since #308, set_option refuses a value that does not fit an option's kind (SetError::Shape, check_shape) before anything is written — so load-time clamping is no longer the only line of defence the sentence above relies on. check_shape has no numeric arm yet; when this issue adds number-kinded options, give it one rather than leaning on the clamp.

  5. bastien-gallay commented on Nov 11, 2026

    @bastien-gallay
    CollaboratorAuthor

    Scope proposal for this issue, after a pass over settings.json against the
    OPTIONS catalogue:

    Make writable over MCP (harmless preferences): sidebar.session_limit,
    terminal.font_size, terminal.copy_on_select,
    terminal.paste_on_right_click, terminal.option_as_meta, close.tab,
    close.app, record.fps, record.max_seconds, record.scale.

    Keep out of the write surface:

    • open.command — its value reaches a command line;
    • mcp.* — a surface must not widen its own reach;
    • capture.redact — new: turning it off unmasks secrets in captures an agent
      may read, so an agent must not be able to switch it off. Expose it
      read-only, and add it to the file-only sentence in
      docs/src/reference/settings.md and docs/src/mcp/stdio.md.
  6. bastien-gallay commented on Nov 11, 2026

    @bastien-gallay
    CollaboratorAuthor

    Triage: scope grew. Missing from OPTIONS now also: capture, terminal.option_as_meta, copy_on_select, paste_on_right_click. check_shape still has no numeric arm. open.command reaches a command line, so it joins the read-only ids.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configarea:mcp

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions