MCP 服务器

Croft

net.oncroft/croft
云与基础设施 开发者工具 公开且可连接 MCP 2026-07-28

此 MCP 可以做什么

Creates, deploys, hosts, monitors, and manages application code, databases, secrets, connectors, schedules, access, and releases.

app_errors
App errors
Grouped errors for an app, read live from its box: uncaught exceptions (with stack traces), silent 5xx responses and container crashes, grouped by fingerprint with count, first/last seen, the releases they occurred in and a sample route. Call with `error_id` to get one group with up to 3 sample events (message, stack, request). `since` is "1h", "24h" (default) or "7d". A group is resolved automatically once it stops occurring after a newer deploy. The fix loop: app_errors → app_errors(error_id) → read_file → write_files → deploy → status → app_errors again. Builders only.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}, 'since': {'enum': ['1h', '24h', '7d'], 'type': 'string'}, 'error_id': {'type': 'integer'}, 'include_resolved': {'type': 'boolean'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'count': {'type': 'integer'}, 'group': {'type': 'object'}, 'since': {'type': ['string', 'null']}, 'groups': {'type': 'array', 'items': {'type': 'object'}}, 'samples': {'type': 'array', 'items': {'type': 'object'}}}}
app_metrics
App metrics
Request, resource and profiling metrics for an app from its box: request count, status mix (2xx/4xx/5xx), error rate, p50/p95/p99 latency, top routes by traffic, slowest and erroring routes, public vs signed-in traffic, cpu / memory / restarts / OOM, app.db + WAL size, healthy %, the last scheduled runs — and, for apps running with the Croft runtime, where the time goes: `breakdown` (average ms per request in the database, external calls and the app's own code), `top_routes_by_time`, `top_external` (hosts / connectors), `top_db` (statements — builders only) and `slowest` (traces; spans for builders). `window` is "1h", "24h" (default) or "7d"; `route` narrows to one route's breakdown and its slowest traces. Use it to answer "is the app healthy / slow / erroring?", "why is it slow?", and to check a fix after deploying.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}, 'route': {'type': 'string', 'description': 'A normalised route, e.g. /invoices/:id — narrows the breakdown and traces to it'}, 'window': {'enum': ['1h', '24h', '7d'], 'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'route': {'type': ['object', 'null']}, 'since': {'type': 'string'}, 'p50_ms': {'type': 'number'}, 'p95_ms': {'type': 'number'}, 'p99_ms': {'type': 'number'}, 'status': {'type': 'object'}, 'top_db': {'type': ['array', 'null']}, 'window': {'type': 'string'}, 'slowest': {'type': 'array', 'items': {'type': 'object'}}, 'requests': {'type': 'integer'}, 'breakdown': {'type': ['object', 'null']}, 'resources': {'type': ['object', 'null']}, 'top_routes': {'type': 'array', 'items': {'type': 'object'}}, 'healthy_pct': {'type': ['number', 'null']}, 'log_dropped': {'type': 'integer'}, 'error_events': {'type': 'integer'}, 'top_external': {'type': 'array', 'items': {'type': 'object'}}, 'releases_seen': {'type': 'array', 'items': {'type': 'string'}}, 'schedule_runs': {'type': 'array', 'items': {'type': 'object'}}, 'distinct_users': {'type': 'integer'}, 'error_rate_pct': {'type': 'number'}, 'slowest_routes': {'type': 'array', 'items': {'type': 'object'}}, 'erroring_routes': {'type': 'array', 'items': {'type': 'object'}}, 'public_requests': {'type': 'integer'}, 'open_error_groups': {'type': 'integer'}, 'signed_in_requests': {'type': 'integer'}, 'top_routes_by_time': {'type': 'array', 'items': {'type': 'object'}}}}
create_app
Create app
Provisions an empty app on this workspace: a git repo, subdomain, port, and golden-path scaffold files. It contains no feature implementation and is not yet live.
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'description': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'url': {'type': 'string'}, 'live': {'type': 'boolean'}, 'files': {'type': 'array', 'items': {'type': 'string'}}, 'conventions': {'type': 'string'}}}
delete_app
Delete app
Permanently deletes an app: removes its containers, data, and source code from the server, then deletes the app record. Irreversible. Does not affect other apps or the server. Deletes only when confirm is true.
可能执行破坏性操作 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'confirm'], 'properties': {'app': {'type': 'string'}, 'confirm': {'type': 'boolean', 'description': 'Must be true for the deletion to proceed; otherwise the call is a no-op.'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'ok': {'type': 'boolean'}, 'app': {'type': 'string'}, 'deleted': {'type': 'string'}, 'confirmation_required': {'type': 'boolean'}}}
deploy
Deploy
Builds the app's committed code (Nixpacks) and releases it on this workspace's own Croft server, replacing the release currently served at the app's URL. Every call builds and releases a new version, even when the code is unchanged; to undo, use rollback. Include a `message` — a short summary of what changed — which becomes this deploy's entry in the app's changelog (shown to the owner in the panel). Returns a deploy job id; the build runs in the background and its deploy_state moves through queued and running before it ends in succeeded or failed. The app is live only once the deploy has succeeded.
可能执行破坏性操作 可访问外部资源
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}, 'message': {'type': 'string', 'description': "A one-line, plain-language summary of what changed in THIS deploy, written for the app's owner to read in the changelog — e.g. 'Add CSV export to the reports page' or 'Fix the login redirect bug'. Describe the user-facing change, not the mechanics; don't just say 'update' or 'deploy'."}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'live': {'type': 'boolean'}, 'status': {'type': 'string'}, 'deploy_job': {'type': 'integer'}}}
describe_app_data
Describe app data
Show the tables and column definitions of a queryable app's SQLite database, so you can write a correct read-only SELECT for query_app_data. The app must be enabled for assistant access (in its settings) and you must have access to it.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'tables': {'type': 'array', 'items': {'type': 'object'}}}}
describe_connector
Describe connector
Returns a connector's manifest — base URL, auth style, and the named operations (method, path, params) an app's code can call — so you can write app code that uses it. Never returns the credential. Connectors are used only by deployed apps: an app's server code calls one through Croft's internal broker (http://croft-data:8080), which is reachable only from inside the workspace's own server. No MCP tool calls a connector, contacts the connected service, or returns data from it, and the credential is never shown to the assistant.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['name'], 'properties': {'name': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'host': {'type': 'string'}, 'kind': {'type': 'string'}, 'name': {'type': 'string'}, 'port': {'type': 'integer'}, 'send': {'type': 'string'}, 'slack': {'type': 'object'}, 'status': {'type': 'string'}, 'enabled': {'type': 'boolean'}, 'base_url': {'type': 'string'}, 'security': {'type': 'string'}, 'auth_style': {'type': 'string'}, 'operations': {'type': 'array', 'items': {'type': 'object'}}, 'description': {'type': 'string'}, 'default_from': {'type': 'string'}, 'has_credential': {'type': 'boolean'}, 'allowed_from_domains': {'type': 'array', 'items': {'type': 'string'}}}}
get_app
Get app
Get an app's file manifest, recent releases, secret key names (never values), and settings_url — its page in the Croft panel, where an owner or admin enters secret values.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['name'], 'properties': {'name': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'url': {'type': 'string'}, 'name': {'type': 'string'}, 'files': {'type': 'array', 'items': {'type': 'string'}}, 'shared': {'type': 'boolean'}, 'status': {'type': 'string'}, 'releases': {'type': 'array', 'items': {'type': 'object'}}, 'schedules': {'type': 'array', 'items': {'type': 'object'}}, 'secret_keys': {'type': 'array', 'items': {'type': 'string'}}, 'public_paths': {'type': 'array', 'items': {'type': 'string'}}, 'settings_url': {'type': 'string'}}}
get_platform_conventions
Get platform conventions
Return the Croft golden-path rules that every app on this workspace must follow.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': [], 'properties': {}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'conventions': {'type': 'string'}}}
grant_access
Grant app access
Gives an existing member of this workspace access to one of its apps. The person must already be in the workspace (see list_users; invite_user adds someone new). It only records the access grant and updates this workspace's own sign-in rules: it sends no email or notification and contacts nothing outside Croft. Repeating it is harmless; undo with revoke_access.
幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['email', 'app'], 'properties': {'app': {'type': 'string', 'description': "The app's name."}, 'email': {'type': 'string', 'description': 'Email address of an existing workspace member, as list_users shows it.'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'ok': {'type': 'boolean'}, 'app': {'type': 'string'}, 'email': {'type': 'string'}}}
grant_connector
Grant connector to app
Gives one of your apps access to a connector. The app can then call the connector's operations. Note: this lets the app's code, and everyone the app is shared with, use the connector's credential. A connector an admin has marked admins-only can only be granted by an admin. Some connectors require admin approval: when a creator grants one of those, the grant is created as 'requested' and an owner/admin must approve it (they're emailed) before the app can use it — owners/admins granting it are approved automatically. Granting doesn't call the external service; the app's code calls it later through Croft's broker, which attaches the credential. Notifications go only to this workspace's own owners and admins, and an owner or admin can revoke the grant in the panel (Connectors). Connectors are used only by deployed apps: an app's server code calls one through Croft's internal broker (http://croft-data:8080), which is reachable only from inside the workspace's own server. No MCP tool calls a connector, contacts the connected service, or returns data from it, and the credential is never shown to the assistant.
可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'connector'], 'properties': {'app': {'type': 'string'}, 'connector': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'state': {'type': 'string'}, 'connector': {'type': 'string'}}}
invite_user
Invite user
Invite someone by email, set their workspace role, and grant app access. role is member (use apps), creator (can build their own apps), or admin. apps is 'all' or a list of app names.
可能执行破坏性操作 可访问外部资源
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['email'], 'properties': {'apps': {'type': ['string', 'array'], 'items': {'type': 'string'}, 'default': 'all', 'description': 'Which apps to grant access to: "all" for every app, or a list of app names.'}, 'role': {'enum': ['member', 'creator', 'admin'], 'type': 'string', 'default': 'member', 'description': 'Workspace role: member (uses shared apps), creator (builds their own apps), or admin.'}, 'email': {'type': 'string', 'description': 'Email address of the person to invite.'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'apps': {}, 'invited': {'type': 'string'}}}
list_apps
List apps
List the apps in this workspace with their URLs, status, and last release.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': [], 'properties': {}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'apps': {'type': 'array', 'items': {'type': 'object'}}, 'app_limit': {'type': 'integer'}, 'apps_remaining': {'type': 'integer'}}}
list_connectors
List connectors
Lists the workspace's API connectors and their state — the external services this workspace's apps are set up to call without holding the credential. `active` connectors are ready for apps to use; `draft` ones still need a workspace admin to add the credential in the panel. Connectors are used only by deployed apps: an app's server code calls one through Croft's internal broker (http://croft-data:8080), which is reachable only from inside the workspace's own server. No MCP tool calls a connector, contacts the connected service, or returns data from it, and the credential is never shown to the assistant.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': [], 'properties': {}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'connectors': {'type': 'array', 'items': {'type': 'object'}}}}
list_data_apps
List queryable apps
List the apps in this workspace whose data you can query read-only — the ones enabled for assistant access in the panel that you also have access to. Use describe_app_data to see an app's tables, then query_app_data to read it. This is how you answer questions about data held inside the workspace's apps — e.g. 'what stocks are in my portfolio app'.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'apps': {'type': 'array', 'items': {'type': 'object'}}}}
list_grants
List connector grants
Lists the connectors an app's code is allowed to call and each grant's state. Connectors are used only by deployed apps: an app's server code calls one through Croft's internal broker (http://croft-data:8080), which is reachable only from inside the workspace's own server. No MCP tool calls a connector, contacts the connected service, or returns data from it, and the credential is never shown to the assistant.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'grants': {'type': 'array', 'items': {'type': 'object'}}}}
list_secret_keys
List secret keys
List an app's secret key names (never values).
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'keys': {'type': 'array', 'items': {'type': 'string'}}}}
list_users
List users
List the people in this workspace and which apps they can access.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': [], 'properties': {}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'users': {'type': 'array', 'items': {'type': 'object'}}}}
logs
App logs
Searchable runtime logs for an app: its container's stdout/stderr for the last 7 days, read live from its box. Filter with `since` (e.g. "1h", "24h", "7d" or an RFC3339 time; default 24h), `grep` (case-insensitive regex or substring) and `level="error"` (stderr + error-looking lines). Newest lines last, up to 500. Builders only.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}, 'grep': {'type': 'string'}, 'level': {'enum': ['error'], 'type': 'string'}, 'lines': {'type': 'integer'}, 'since': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'logs': {'type': 'string'}, 'count': {'type': 'integer'}, 'since': {'type': ['string', 'null']}, 'health': {'type': 'string'}, 'source': {'type': 'string'}}}
propose_connector
Propose connector
Creates a new API connector as a DRAFT from the vendor's API docs: you supply the base URL, auth style, and an operations manifest. A workspace member (owner, admin, or creator) then opens the panel and adds the credential to activate it — the credential never passes through you. auth_style is bearer|header|query|basic|aws_sigv4; for header/query also give auth_param (the header/param name). For AWS APIs (and SigV4 S3-compatible stores like R2) use aws_sigv4 with aws_region and aws_service (both inferred from a regional *.amazonaws.com base_url if omitted) — Croft signs each of the app's calls with the stored access key. This tool only records the draft; it doesn't contact the API. Connectors are used only by deployed apps: an app's server code calls one through Croft's internal broker (http://croft-data:8080), which is reachable only from inside the workspace's own server. No MCP tool calls a connector, contacts the connected service, or returns data from it, and the credential is never shown to the assistant.
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['name', 'base_url', 'auth_style', 'operations'], 'properties': {'name': {'type': 'string', 'description': 'Short slug, e.g. "stripe".'}, 'base_url': {'type': 'string', 'description': 'https base URL, e.g. "https://api.stripe.com".'}, 'auth_param': {'type': 'string', 'description': 'Header or query-param name (for header/query auth).'}, 'auth_style': {'enum': ['bearer', 'header', 'query', 'basic', 'aws_sigv4'], 'type': 'string'}, 'aws_region': {'type': 'string', 'description': 'Signing region for aws_sigv4, e.g. "ap-southeast-2" ("auto" for Cloudflare R2).'}, 'operations': {'type': 'object', 'description': 'Map of operation name → { method, path, params: [names] }. Path may contain {placeholders}.', 'additionalProperties': {'type': 'object', 'required': ['method', 'path'], 'properties': {'path': {'type': 'string'}, 'method': {'type': 'string'}, 'params': {'type': 'array', 'items': {'type': 'string'}}}}}, 'aws_service': {'type': 'string', 'description': 'Signing service name for aws_sigv4, e.g. "s3", "dynamodb", "execute-api".'}, 'description': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'status': {'type': 'string'}, 'connector': {'type': 'string'}, 'operations': {'type': 'array', 'items': {'type': 'string'}}}}
query_app_data
Query app data
Run a single READ-ONLY SQL query (SELECT/WITH only) against a queryable app's live SQLite database and get the rows back. Use describe_app_data first to learn the schema. Parameterise values via `params` with ? placeholders. Results are row-limited (max 500). Writes, PRAGMA and ATTACH are rejected. The app must be enabled for assistant access (in its settings) and you must have access to it; every query is audited.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'sql'], 'properties': {'app': {'type': 'string'}, 'sql': {'type': 'string', 'description': 'A single SELECT/WITH statement. Use ? placeholders for values.'}, 'limit': {'type': 'integer', 'description': 'Max rows (default 200, max 500).'}, 'params': {'type': 'array', 'items': {}, 'description': 'Values for the ? placeholders, in order.'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'rows': {'type': 'array', 'items': {'type': 'object'}}, 'row_count': {'type': 'integer'}, 'truncated': {'type': 'boolean'}}}
read_file
Read file
Read one file from an app's own git repo on this Croft workspace. No external API — the path is resolved inside the app's repository.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'path'], 'properties': {'app': {'type': 'string', 'description': "The app's name."}, 'path': {'type': 'string', 'description': 'Repo-relative file path, e.g. "app/models/user.rb".'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'path': {'type': 'string'}, 'content': {'type': 'string'}}}
request_public_data_access
Allow a public app to use protected resources
An app configuration setting, not data access for the assistant. Apps with public (login-free) routes are blocked by default from using their own granted connectors and other apps' shared data, so a public page can't leak workspace data. This turns that block off for one app, so its server code may use those resources. If you (the caller) are an owner or admin it takes effect immediately; if you're a creator it opens a request that an owner or admin approves in the panel (they're emailed). Call it only when building a public app that genuinely needs a connector or shared data. It returns no data, gives the assistant no new access, and contacts nothing outside Croft.
可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'state': {'type': 'string'}, 'public_data_access': {'type': 'boolean'}}}
revoke_access
Revoke app access
Revoke a user's access to an app.
可能执行破坏性操作 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['email', 'app'], 'properties': {'app': {'type': 'string'}, 'email': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'ok': {'type': 'boolean'}}}
rollback
Roll back
Replaces an app's live release with its previous release, on this workspace's own Croft server. Runs as a background deploy job — poll status until deploy_state is succeeded. The current release stops being served at the app's URL; call deploy to release the latest code again. Each call queues another rollback.
可能执行破坏性操作 可访问外部资源
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'status': {'type': 'string'}, 'deploy_job': {'type': 'integer'}}}
set_app_icon
Set app icon
Set the app's icon, shown next to it in the Croft panel. Provide `svg`: complete, self-contained SVG markup for a simple, recognisable icon on a square canvas (use viewBox '0 0 64 64', bold shapes and a filled background, no <script>/<image>/external refs). It's stored and rendered as an image. Optional — without one the panel shows a generated fallback (a gradient tile + the app's initial), so only set an icon when you can make a genuinely representative one.
可能执行破坏性操作 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'svg'], 'properties': {'app': {'type': 'string'}, 'svg': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'ok': {'type': 'boolean'}, 'app': {'type': 'string'}}}
set_database_sharing
Set database sharing
Turns this app's database sharing on or off. Off by default (the database is private). When on, other apps in the same workspace may read AND write this app's SQLite database through Croft's internal broker at http://croft-data:8080/q/<this-app-name> (send {"sql":"…","params":[…]}), and this app is listed to other apps as reusable shared data. Pass read_only: true when this app's tables are maintained by a job (e.g. a sync from an external system) so other apps get a READ-ONLY handle and can't write rows the next run would overwrite. By default apps that have PUBLIC routes cannot read this shared data (a leak guard); an owner/admin can pass allow_public: true to let public apps read it too. Turn sharing on for an app whose data other apps should reuse — e.g. a CRM's contacts list that an invoicing app also needs.
可能执行破坏性操作 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'shared'], 'properties': {'app': {'type': 'string'}, 'shared': {'type': 'boolean', 'description': "true to share this app's database with the workspace; false to keep it private."}, 'read_only': {'type': 'boolean', 'description': 'true to give other apps a read-only handle (they can SELECT but not write). Default false (read + write).'}, 'allow_public': {'type': 'boolean', 'description': 'Owner/admin only. true lets apps with public routes read this shared data (default false — public apps are blocked).'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'shared': {'type': 'boolean'}, 'allow_public': {'type': 'boolean'}}}
set_public_paths
Set public paths
Sets which of an app's paths are reachable WITHOUT login. By default an app is fully private (workspace login required everywhere). Pass the complete desired list of specific paths (e.g. ["/survey"]); each listed path and everything under it becomes public, everything else stays private. An empty list makes the app fully private again. The whole app cannot be made public — root or wildcard paths are rejected. This changes who can reach the app: listed paths become reachable by anyone on the internet without signing in, so list only pages meant to be public (a form, a webhook). The list replaces the previous one and applies on this workspace's own server within about a minute; no data is sent anywhere.
可能执行破坏性操作 可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'paths'], 'properties': {'app': {'type': 'string'}, 'paths': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Full list of public paths, each starting with / (e.g. "/survey"). Empty to make fully private.'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'public': {'type': 'boolean'}, 'public_paths': {'type': 'array', 'items': {'type': 'string'}}}}
set_schedules
Set scheduled tasks
Sets the app's scheduled tasks. Each is { name, cron, path }: on the cron (standard 5-field, UTC) Croft makes an internal POST to the app's path, and the app does the work (e.g. send a daily email, sync an API). Use this for anything recurring instead of writing your own cron — it survives deploys and reboots and is shown in the panel. Also implement the endpoint (e.g. a POST route at that path). Pass the full desired list; an empty list clears all schedules.
可能执行破坏性操作 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'schedules'], 'properties': {'app': {'type': 'string'}, 'schedules': {'type': 'array', 'items': {'type': 'object', 'required': ['name', 'cron', 'path'], 'properties': {'cron': {'type': 'string', 'description': '5-field cron in UTC, e.g. "0 8 * * *" for 08:00 daily.'}, 'name': {'type': 'string', 'description': 'Short id, e.g. "daily-digest".'}, 'path': {'type': 'string', 'description': 'Local path to POST, e.g. "/tasks/digest". Keep it out of public_paths.'}}}}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'schedules': {'type': 'array', 'items': {'type': 'object'}}}}
status
App status
Reports an app's deploy and health status. `live` is true only when the latest deploy has fully succeeded; `deploy_state` gives the current stage (queued, running, succeeded, or failed). Read-only and safe to call repeatedly — each call returns the current stage, so it can be polled to follow a deploy's progress.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app'], 'properties': {'app': {'type': 'string'}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'app': {'type': 'string'}, 'url': {'type': 'string'}, 'live': {'type': 'boolean'}, 'health': {'type': 'string'}, 'shared': {'type': 'boolean'}, 'profiled': {'type': 'boolean'}, 'releases': {'type': 'integer'}, 'schedules': {'type': 'array', 'items': {'type': 'object'}}, 'last_deploy': {'type': ['object', 'null']}, 'deploy_state': {'type': 'string'}, 'public_paths': {'type': 'array', 'items': {'type': 'string'}}, 'avg_ms_last_hour': {'type': ['number', 'null']}, 'errors_last_hour': {'type': ['integer', 'null']}, 'p95_ms_last_hour': {'type': ['number', 'null']}, 'requests_last_hour': {'type': ['integer', 'null']}}}
write_files
Write files
Writes files into an app's git repo and commits them (as 'Claude via Croft'). files is a list of {path, content}. Committed files are staged in the repo; they are not built or published until the app is deployed.
可能执行破坏性操作 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['app', 'files'], 'properties': {'app': {'type': 'string'}, 'files': {'type': 'array', 'items': {'type': 'object', 'required': ['path', 'content'], 'properties': {'path': {'type': 'string'}, 'content': {'type': 'string'}}}}}}
输出模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'ok': {'type': 'boolean'}, 'sha': {'type': 'string'}, 'live': {'type': 'boolean'}, 'files': {'type': 'array', 'items': {'type': 'string'}}}}
已移除
set_secret
2026年10月3日 02:58
已更改
list_grants
2026年10月3日 02:58
已更改
grant_connector
2026年10月3日 02:58
已更改
propose_connector
2026年10月3日 02:58
已更改
describe_connector
2026年10月3日 02:58
已更改
list_connectors
2026年10月3日 02:58
已更改
request_public_data_access
2026年10月3日 02:58
已更改
set_public_paths
2026年10月3日 02:58
已更改
grant_access
2026年10月3日 02:58
已更改
rollback
2026年10月3日 02:58
已更改
deploy
2026年10月3日 02:58
已更改
get_app
2026年10月3日 02:58
已更改
describe_connector
2026年9月23日 02:50
已更改
status
2026年9月23日 02:50
已添加
app_errors
2026年9月19日 02:48
已添加
app_metrics
2026年9月19日 02:48
已更改
logs
2026年9月19日 02:48
已更改
status
2026年9月19日 02:48
已添加
list_grants
2026年9月17日 12:54
已添加
grant_connector
2026年9月17日 12:54
已添加
propose_connector
2026年9月17日 12:54
已添加
describe_connector
2026年9月17日 12:54
已添加
list_connectors
2026年9月17日 12:54
已添加
request_public_data_access
2026年9月17日 12:54
已添加
query_app_data
2026年9月17日 12:54
已添加
describe_app_data
2026年9月17日 12:54
已添加
list_data_apps
2026年9月17日 12:54
已添加
set_database_sharing
2026年9月17日 12:54
已添加
set_schedules
2026年9月17日 12:54
已添加
set_public_paths
2026年9月17日 12:54