Part of #390.
Summary
Surface the configuration examples that kbagent already fetches but throws away, porting the get_config_examples MCP tool. This is essentially a reformat-only feature.
MCP source (keboola-mcp-server @ agent-v1.60.0)
- Tool:
src/keboola_mcp_server/tools/components/tools.py (get_config_examples) — calls ai_service_client.get_component_detail(component_id) (the same GET docs/components/{id} endpoint kbagent uses) and reads rootConfigurationExamples / rowConfigurationExamples off the payload.
- Output: markdown —
## Root Configuration Examples / ## Row Configuration Examples, each example as a numbered json block. No separate endpoint, no static bundle, no cap.
What kbagent already has
ai_client.py get_component_detail hits the identical GET /docs/components/{id} endpoint.
- The
ComponentDetail model already parses both example lists (root_configuration_examples / row_configuration_examples, aliased from rootConfigurationExamples / rowConfigurationExamples).
- But
component_service.py get_component_detail discards the bodies and returns only examples_count / row_examples_count; commands/component.py shows just "{N} root config example(s)" and --json carries no example bodies.
- The full bodies are already consumed internally for scaffold generation — proof the data flows end-to-end.
Proposed command
kbagent config examples --component-id ID [--project NAME] [--row]
(Lives naturally in component group too, since the data source is the component, not a config. component examples is an equally valid placement — decide during implementation. --row filters to row examples.)
Implementation sketch (3-layer)
- L3 none — reuse
get_component_detail.
- L2
ComponentService.get_config_examples(alias, component_id) → stop discarding the lists; return {component_id, root_examples, row_examples}.
- L1 thin command;
--json emits structured example dicts (more useful to agents than a markdown blob); human renders numbered JSON blocks.
Effort: S (nearly free)
Acceptance criteria
Risks / open questions
- Decide: new subcommand vs.
--examples flag on component detail (recommendation: subcommand — examples can be large/noisy in a summary panel).
- Dual-output:
--json should be structured dicts, not the MCP markdown string. Make this an explicit decision so it isn't cargo-culted.
Part of #390.
Summary
Surface the configuration examples that
kbagentalready fetches but throws away, porting theget_config_examplesMCP tool. This is essentially a reformat-only feature.MCP source (
keboola-mcp-server@agent-v1.60.0)src/keboola_mcp_server/tools/components/tools.py(get_config_examples) — callsai_service_client.get_component_detail(component_id)(the sameGET docs/components/{id}endpoint kbagent uses) and readsrootConfigurationExamples/rowConfigurationExamplesoff the payload.## Root Configuration Examples/## Row Configuration Examples, each example as a numberedjsonblock. No separate endpoint, no static bundle, no cap.What kbagent already has
ai_client.pyget_component_detailhits the identicalGET /docs/components/{id}endpoint.ComponentDetailmodel already parses both example lists (root_configuration_examples/row_configuration_examples, aliased fromrootConfigurationExamples/rowConfigurationExamples).component_service.pyget_component_detaildiscards the bodies and returns onlyexamples_count/row_examples_count;commands/component.pyshows just"{N} root config example(s)"and--jsoncarries no example bodies.Proposed command
(Lives naturally in
componentgroup too, since the data source is the component, not a config.component examplesis an equally valid placement — decide during implementation.--rowfilters to row examples.)Implementation sketch (3-layer)
get_component_detail.ComponentService.get_config_examples(alias, component_id)→ stop discarding the lists; return{component_id, root_examples, row_examples}.--jsonemits structured example dicts (more useful to agents than a markdown blob); human renders numbered JSON blocks.Effort: S (nearly free)
Acceptance criteria
kbagent config examples --component-id IDprints root (+ row with--row) examples.--jsonemits structured{component_id, root_examples, row_examples}.Risks / open questions
--examplesflag oncomponent detail(recommendation: subcommand — examples can be large/noisy in a summary panel).--jsonshould be structured dicts, not the MCP markdown string. Make this an explicit decision so it isn't cargo-culted.