qiloback-mcp

v0.5.4
qiloback-mcp Checked 1 day ago Published 6 months ago

QiloBack MCP Server — AI tool integration for backend manufacturing

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_project Create Project

Create a new QiloBack project. Templates: saas-starter, ecommerce, cms, crm, marketplace, social-network, project-management, booking-system, learning-platform, inventory. Leave template empty for a blank project.

ParameterTypeDescription
name *string
templatestring

get_project Get Project

Fetch a single project's metadata (name, slug, status, timestamps).

ParameterTypeDescription
project_id *string

list_projects List Projects

List all QiloBack projects.

delete_project Delete Project

Soft-delete a project by id. Generated artefacts are kept; the project row is marked deleted_at and disappears from list_projects.

ParameterTypeDescription
project_id *string

eject_project Eject Project

Download the project's portable backend bundle. Calls POST /api/v1/projects/{id}/eject and either saves the zip to ``output_path`` (when provided) or returns a base64-encoded preview of the first 4 KiB so the AI agent can reason about the bundle without holding the whole binary in context. The bundle contains the FastAPI source, a Dockerfile, a docker- compose stack, a deploy README and an Apache-2.0 license — runs on any container host with no QiloBack runtime dependency.

ParameterTypeDescription
project_id *string
output_pathstring

get_project_dsl Get Project Dsl

Get the DSL YAML of a project. Returns the full YAML definition including entities, modules, and configuration.

ParameterTypeDescription
project_id *string

update_dsl Update Dsl

Update a project's DSL with new YAML content. The YAML must be valid QiloBack DSL. It will be validated before saving.

ParameterTypeDescription
dsl_yaml *string
project_id *string

validate_dsl Validate Dsl

Validate the project's persisted DSL. Returns the validator's verdict — ``valid`` plus arrays of errors and warnings. Same surface the panel uses before save.

ParameterTypeDescription
project_id *string

diff_dsl Diff Dsl

Compare a proposed DSL against the persisted one without saving. Returns the unified diff plus a structured per-entity summary of additions, removals and field-level changes, alongside the validator's verdict on the proposal.

ParameterTypeDescription
project_id *string
proposed_yaml *string

add_entity Add Entity

Add an entity to a project. Fields format: [{"name": "title", "type": "string", "required": true, "unique": false}] Supported types: string, text, integer, float, decimal, boolean, date, datetime, email, url, uuid, json, enum, file, encrypted, slug.

ParameterTypeDescription
fields *array
name *string
project_id *string

list_templates List Templates

List available project templates. Templates provide pre-configured DSL definitions for common application types.

generate_backend Generate Backend

Generate the backend from the project's DSL. This compiles the YAML DSL into a full FastAPI backend with models, schemas, repositories, services, routers, tests, and RLS policies.

ParameterTypeDescription
project_id *string

list_generations List Generations

List the generation history for a project (most recent first). Each entry has the DSL hash that was generated, the status, the duration, who triggered it and the timestamp.

ParameterTypeDescription
project_id *string

get_generation Get Generation

Fetch a single generation log row by id (includes the artefact list, DSL hash, error message if any).

ParameterTypeDescription
generation_id *string

generate_sdk Generate Sdk

Generate a client SDK for a project. Languages: ts (TypeScript), py (Python), go (Go), dart (Dart). Returns the generated SDK code or download information.

ParameterTypeDescription
project_id *string
languagestring

scan_frontend Scan Frontend

Scan frontend code and generate a backend DSL. Analyzes the code to detect API calls, data models, and auth patterns, then produces a QiloBack DSL YAML that implements the required backend. Supported languages: typescript, javascript, python, dart.

ParameterTypeDescription
code *string
languagestring

migration_status Migration Status

Return the project's Alembic head and the diff of pending migrations against the live DB. Maps to GET /projects/{id}/migrations/status.

ParameterTypeDescription
project_id *string

health_check Health Check

Hit the platform-api ``/health`` endpoint and return the live status payload (database, redis, version).

get_audit_events Get Audit Events

Tail the platform audit log. Filter by ``project_id`` and/or ``event_type`` (e.g. ``ingest.applied``, ``project.created``). The audit log is event- sourced with HMAC-chained row signatures; tampering shows up at verification time.

ParameterTypeDescription
event_typestring
limitinteger
project_idstring

get_metrics Get Metrics

Fetch a Prometheus-shaped metrics summary for the platform. ``metric`` filters by metric name prefix (empty = all). ``range_minutes`` is the lookback window (default 60).

ParameterTypeDescription
metricstring
range_minutesinteger

ai_generate_dsl Ai Generate Dsl

Generate a backend DSL from a natural language description. Describe what your backend needs (entities, auth, billing, etc.) and QiloBack will produce a valid DSL YAML. Example: "E-commerce with products, orders, customers, payments, and inventory tracking"

ParameterTypeDescription
description *string

review_dsl Review Dsl

Run the AI review pass over the project's DSL. The reviewer flags anti-patterns (missing tenant_id on a multi- tenant entity, suspect index choices, fields without max_length, relations without on-delete behaviour) and returns a structured list of findings with suggested edits.

ParameterTypeDescription
project_id *string

suggest_indexes Suggest Indexes

Ask the platform for index recommendations on the project's DSL. Reads the model graph + recent query patterns and proposes composite / partial indexes worth adding.

ParameterTypeDescription
project_id *string

list_components List Components

List the components advertised by the platform's marketplace. Returns the same structured payload the panel renders, each entry carries name, version, description, tags, the table count and the endpoint count. Use this before calling :func:`get_component` when an agent wants to browse before installing.

get_component Get Component

Return the full manifest for the named component. Same shape the marketplace UI uses to render the install dialog: declared tables, endpoints, config knobs, lifecycle hooks and the list of files the component will emit into the host project on install.

ParameterTypeDescription
name *string

live_drift_list Live Drift List

List unmapped API requests captured by the Live Backend (Sprint 11). Returns a JSON summary the agent can use to propose a DSL patch: each entry has the HTTP method, path, status returned, hit count and timestamps. The body and headers are sanitised at capture time so no secrets leak into the agent context. The endpoint is only served when the backend is running in Dev runtime mode (``QILOBACK_RUNTIME_MODE=dev``). In Prod mode this tool will see a 404 and return an explanatory message rather than the row list.

ParameterTypeDescription
limitinteger

live_drift_summary Live Drift Summary

Aggregated per-signature drift counts for the active workspace. Lighter shape than ``live_drift_list``: returns total + unresolved counts plus per-signature buckets (method x status_returned x count). Useful for the agent to gauge how much drift the frontend has accumulated without paging through individual rows.

live_drift_dismiss Live Drift Dismiss

Mark a drift event as intentional / not actionable. The agent uses this when it determines a 404 is expected (e.g. a health probe path) and should not be proposed as a DSL change.

ParameterTypeDescription
drift_id *string
reasonstring

live_schema_diff Live Schema Diff

Compute the schema diff the Live Backend would propose right now. Returns the additive (safe), destructive (data-loss) and config change buckets the panel renders. Each bucket entry carries the rationale, the suggested DSL patch and the suggested Alembic migration op so the agent can either apply directly (Rings I3-I5) or paste the patch into the project YAML.

ParameterTypeDescription
min_hit_countinteger
project_idstring

live_dsl_preview Live Dsl Preview

Validate a DSL patch in memory without applying it. Mirrors ``POST /api/v1/live/diff/preview``: the agent pastes the YAML it wants to apply, the server merges + validates against ``qiloback_dsl``, and the response tells the agent whether to apply or surface the errors to the user. No side effects — the merged document never reaches disk.

ParameterTypeDescription
patch_yaml *string
project_idstring

live_migration_preview Live Migration Preview

Render an Alembic revision for the patch (Sprint 11 Ring I4). Returns the generated revision id, filename and Python source the apply step would execute. The handler runs the live Alembic generator against the database's current snapshot; new entities become ``create_table`` and known entities get ``add_column``. Destructive ops trigger a 409 with a Ring I9 hint rather than producing unsafe SQL.

ParameterTypeDescription
patch_yaml *string
labelstring
parent_revisionstring
project_idstring

live_apply_patch Live Apply Patch

Apply the additive migration generated from a patch (Sprint 11 Ring I5). Runs the schema change inside a Postgres savepoint with workspace-scoped advisory locking. Failures roll back automatically. Either way an audit row lands in ``platform_live_applies`` so the operator history stays complete. Returns the apply id + status + latency_ms + error message when ``status=failed``.

ParameterTypeDescription
patch_yaml *string
parent_revisionstring
project_idstring

live_runtime_mode Live Runtime Mode

Report the runtime mode the backend is running in (Sprint 11 Ring I6). Returns ``{"mode": "dev", "live_drift_disabled": false}`` when the backend is sitting on the dev side of the dual-mode boundary; a 404 means the backend is in prod mode and the Live Backend surface is intentionally not mounted.

live_state_snapshot Live State Snapshot

Snapshot the live applies so the operator can freeze them (Sprint 11 Ring I6). Returns the workspace's applied revisions plus the unresolved drift count. The CLI consumes the same surface for ``qiloback freeze``; agents call this when they want a reproducible view of what the runtime would commit before they propose any further patch.

ParameterTypeDescription
project_idstring

live_destructive_propose Live Destructive Propose

Propose a destructive schema change (Sprint 11 Ring I9). Captures impact + a dump file on the platform-api host and stores the operation in ``proposed`` state. The agent must follow up with ``live_destructive_apply`` plus a >=20 char reason to actually run the destructive SQL.

ParameterTypeDescription
kind *string
target *string
project_idstring

live_destructive_apply Live Destructive Apply

Apply a proposed destructive op (Sprint 11 Ring I9).

ParameterTypeDescription
confirmation_reason *string
op_id *string

live_destructive_undo Live Destructive Undo

Undo an applied destructive op while the window is open.

ParameterTypeDescription
op_id *string

live_status Live Status

Aggregated Live Backend status for the caller's workspace (Sprint 11 Ring I11). One call returns every number the agent needs to decide if it should propose, apply, or undo something: runtime mode, pending and resolved drift counts, count of applied live revisions, pending destructive proposals, still-undoable destructive applies, and the timestamp of the last apply. Prefer this tool over chaining ``live_runtime_mode`` + ``live_drift_summary`` + a destructive list — it costs one request and the counters are computed in the same DB session so they are internally consistent.