Skip to main content
Glama

Update Config

update_config

Validate and save dashboard UI configuration JSON, checking required keys, KPI/chart/filter structure, and SQL syntax before writing the file and creating a backup.

Instructions

Update the UI configuration file with validated JSON.

This tool validates the complete ui_config.json structure before saving:

  • Checks required keys: modulos, filtros_globales, column_mapping

  • Validates each module has id, nombre, and proper kpis/graficos/tablas

  • Validates each KPI has sql and label

  • Validates each chart has sql, tipo, and titulo

  • Validates each filter has nombre, columna, and tabla

  • Validates all SQL queries for syntax errors

  • Auto-fills missing optional fields (brand_name, footer, empty_state, etc.)

  • Creates a backup of the previous config (.json.bak)

⚠️ BEFORE calling this tool, you MUST:

  1. Review your JSON carefully — especially chart color fields (column name, NOT hex).

  2. Ensure all SQL queries use the correct table name and column names.

  3. After saving, call validate_config() to verify all queries execute correctly.

  4. Fix any errors reported by validate_config() before telling the user it's ready.

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": {
      "json_string": "<json_string>"
    },
    "name": "update_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
json_stringYesValid JSON string with complete ui_config.json structure.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it discloses that the full structure is validated before saving, that missing optional fields are auto-filled, and that a .json.bak backup is created — key context for an overwrite operation. It stops short of saying what happens when validation fails (returned error vs. exception) or whether the write is atomic.

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?

Front-loaded with the one-line purpose, then a scannable bullet list of validations and a numbered pre-call checklist. The bullets are dense but each names a distinct validation rule; the emoji warning is slightly theatrical but not wasteful.

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 a single-parameter overwrite tool with an output schema, the definition covers validation scope, side effects (backup, auto-fill), and workflow sequencing. The remaining gap is failure behavior — what the tool returns or raises when validation rejects the JSON.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single json_string parameter, so the schema baseline applies. The description does add real meaning by enumerating the required keys and per-object fields that must be present, but this is structure documentation rather than semantics of the parameter itself.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Update the UI configuration file with validated JSON,' which is unambiguous against siblings like get_config, load_config, or generate_config. It also positions validate_config explicitly as the paired follow-up, though it doesn't contrast itself with generate_config or the build_* helpers that could also produce config.

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?

Gives an explicit pre-call checklist (review color fields, verify table/column names) and an explicit post-call step ('After saving, call validate_config() to verify all queries execute correctly', then 'Fix any errors... before telling the user it's ready'). This is a rare case of concrete when-to-use and what-to-do-next guidance, naming the alternative tool directly.

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