Skip to content

MCP config tools: an endpoint created via flapi_create_endpoint can't be given a template, persisted or served #155

Closed

Description

@jrosskopf

What

The create → update template → reload workflow documented in docs/MCP_CONFIG_INTEGRATION.md cannot work, even with the transport corrected (found while fixing that doc's routes for #151/#154).

Reproduced against v26.09.26 with --config-service --config-service-token <token>, over POST /mcp/jsonrpc:

step call result
1 flapi_create_endpoint {"path":"orders2","method":"GET","template-source":"orders2.sql"} "Endpoint created successfully", but "template_source":"" — the passed value is ignored
2 flapi_update_template {"endpoint":"orders2","content":"SELECT 42 AS n"} error: Could not open template file for writing: <template dir>/ — it tries to write to the directory, because the template source is empty
3 flapi_reload_endpoint {"path":"orders2"} error: Failed to reload endpoint configuration from disk — step 1 wrote nothing to disk
— GET /orders2 Not Found

Nothing is written under sqls/ at any point.

Contributing causes

  • flapi_create_endpoint's advertised inputSchema declares only path, so an MCP client has no documented way to set a template source; passing template-source anyway is silently dropped (while an undeclared method is honoured, which is inconsistent).
  • The created endpoint exists only in memory, so reload (which reads from disk) can never find it.
  • update_template with an empty template source builds a path that is just the template directory, and surfaces the resulting OS error rather than saying the endpoint has no template.
  • The path is registered as given (orders2, no leading slash); whether it is reachable at all is worth checking.

Expected

Either the create tool accepts (and declares) what an endpoint needs — url-path, template-source, connection — and persists a YAML so reload and restarts keep it, or it is documented as in-memory-only and update_template/reload say so plainly.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions