Skip to content

get_configs: provide structured JSON output (text format breaks programmatic parsing) #244

Description

@beckavac

Problem

get_configs returns configurations as a single flattened text blob (a YAML/pretty-printed format inside the content[0] string), rather than the structured JSON returned by the Storage API.

For interactive use this is fine, but programmatic consumers have to:

  1. Parse the text with regex
  2. Deal with escape-sequence handling for multi-line values (notably SQL query fields with \n literals)
  3. Reconstruct nested fields like parameters.primaryKey from indented sub-keys

In our case this directly broke a workflow: detecting a top-level WHERE clause in MySQL extractor queries was unreliable because newlines were rendered as \n literals in the text output, not as actual \n characters. We had to fall back to direct curl calls against /v2/storage/components/{component}/configs/{config}/rows to get usable JSON.

Repro

kbagent --json tool call get_configs --project <p> --input '{"configs":[{"component_id":"keboola.ex-db-mysql","configuration_id":"<id>"}]}'

→ The data.results[0].content[0] is a string. Multi-line parameters.query values come back with escape sequences, not real newlines.

Proposal

Either:

  • (preferred) Add a format: "json" flag (default "text" for back-compat) that returns the full Storage API response as structured JSON.
  • Or ship a dedicated get_config_raw tool that returns the row payload as-is.

Impact

Without this, any agent doing structured edits on configurations (esp. SQL queries, nested params, primary keys) has to bypass MCP for reads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions