Model Context Protocol · Tool Reference

MCP Tools
structured context for agents.

Mimiran exposes 38 structured tools over the Model Context Protocol. AI agents query routes, schemas, features, and invariants directly — no file parsing, no hallucinated context, no outdated snapshots.

38
Total tools
20
Read tools
18
Write tools
8
Categories
Protocol

How agents use MCP tools

A complete coding loop: query context → write code with correct data → sync changes back. All three steps happen over the same MCP connection.

01

Agent calls a Read tool

The AI agent (Cursor, Windsurf, Claude Code, etc.) calls a Mimiran Read tool via the MCP protocol. No file system access required — context is returned as structured JSON.

→ CallTool context_by_route "/api/v1/payments"
← { route, handler, schema, feature, invariants }
02

Agent writes code with correct context

The agent uses the structured context to write code that respects actual table schemas, existing feature contracts, and architectural invariants — not hallucinated guesses.

→ CallTool db_describe_table "payments"
← { columns: [...], indexes: [...], enums: [...] }
03

Agent syncs changes back

After writing code, the agent opens a delta-sync session and streams changed fragments back to Mimiran. Context stays accurate without a full rebuild.

→ CallTool open_sync_session {}
→ CallTool sync_session_batch { patches: [...] }
→ CallTool close_sync_session {}
7 tools

Knowledge & Context

Query structured context about routes, features, and the full knowledge graph. These are the primary tools AI agents use during active coding sessions.

read
context_by_route

Returns full context for a given API route or page path — handler, schema, feature links, invariants.

read
context_by_feature

Returns context scoped to a named feature — spec, related routes, DB tables, ownership.

read
search_context

Semantic search across the project knowledge graph. Returns ranked fragments by relevance.

read
get_feature_registry

Returns the full FEATURE_REGISTRY.md as a structured object — all features, statuses, owners.

read
get_tech_stack

Returns the complete technology stack snapshot — runtimes, frameworks, infrastructure.

read
get_ai_rules

Returns AI coding rules and constraints defined for this project. Agents respect these by default.

read
get_ui_rules

Returns UI and design system rules — component conventions, token usage, layout constraints.

3 tools

Database Awareness

Expose the full database schema to AI agents without sending migration files. Tables, columns, types, and enums — structured and queryable.

read
db_list_tables

Lists all tracked database tables with their column counts and last-synced timestamps.

read
db_describe_table

Returns full schema for a given table — columns, types, nullability, foreign keys, indexes.

read
db_list_enums

Lists all tracked database enums with their values and the tables that reference them.

3 tools

Integrity & Invariants

Query the architectural rules defined for your project. Invariants are validated by the CLI and exposed to agents so they can self-check before writing code.

read
get_invariants

Returns all defined architectural invariants — forbidden patterns, import rules, platform isolation constraints.

read
get_context_meta

Returns context health metadata — last sync timestamps, artifact freshness, coverage gaps.

read
get_setup_state

Returns the current setup wizard state — completed steps, missing configuration, next actions.

7 tools

Project & Repo State

Inspect project binding, connected repositories, and snapshot availability. Used during setup and by orchestration agents.

read
get_project_binding

Returns the active project binding — project ID, org, server endpoint, token scope.

read
list_repo_connections

Lists all registered repository connections for the current project.

read
list_snapshots

Lists all available context snapshots — version, created timestamp, artifact coverage.

read
get_snapshot_status

Returns the build status of a specific snapshot — processing, ready, or failed.

read
get_sync_helper_state

Returns the sync helper adapter installation state and version on the host.

read
get_sync_session_state

Returns the state of the current active sync session — open batches, pending flushes.

read
get_pending_bridge_upload

Returns any pending bridge upload task — token, expiry, expected artifacts.

4 tools

Sync Operations

Trigger full sync jobs that rebuild artifacts from the codebase. These are the batch-mode counterparts to delta-sync sessions.

write
sync_monorepo_map

Rebuilds MONOREPO_MAP.md from the current repo structure — packages, apps, shared modules.

write
sync_context

Synchronises context/* with codebase — feature specs, page docs, dependency graph, DB schema.

write
start_sync_job

Enqueues a named sync job on the server for async execution.

write
execute_sync_job

Executes a specific sync job synchronously and returns the result.

4 tools

Delta-sync Sessions

Incremental sync for active AI coding flows. Instead of rebuilding all artifacts, sessions stream only the changed fragments — keeping context fresh without full scans.

write
open_sync_session

Opens a new incremental sync session. Returns a session ID used by subsequent batch calls.

write
sync_session_batch

Sends a batch of changed fragments within an open session. Supports partial file updates.

write
flush_sync_session

Flushes buffered session data to the server without closing the session.

write
close_sync_session

Commits all session changes and closes the session. Triggers artifact reindex.

2 tools

Documentation Scaffold

Generate structured markdown scaffolds that agents fill in. These tools create the skeleton — agents populate the content based on current code context.

write
scaffold_feature_spec

Creates a feature spec scaffold in context/features/ with sections for purpose, routes, DB tables, ownership.

write
scaffold_page_doc

Creates a page documentation scaffold in context/pages/ with sections for layout, data flow, components.

8 tools

Project Management

Bootstrap and configure projects programmatically. Used by setup agents and CI/CD pipelines to register repositories and initialise context infrastructure.

write
setup_project

Runs the full guided project setup — creates project, registers repo, uploads initial snapshot.

write
create_project

Creates a new project in the current org with the given name and settings.

write
delete_project

Deletes a project and all its associated artifacts, tokens, and sync state.

write
connect_project

Connects the local repo to an existing project by binding the project ID.

write
upsert_repo_connection

Registers or updates a repository connection — remote URL, branch, root path.

write
install_sync_helper

Installs the sync helper adapter on the host machine for the current project.

write
ensure_host_adapter

Verifies the host adapter is installed and at the correct version, installs if missing.

write
write_bridge_token

Writes a one-time bridge upload token to disk for the initial source snapshot transfer.

Security

Built-in safety guarantees

Every MCP call goes through Mimiran's security layer before reaching project data.

Path Traversal Protection

ReadResource is protected against path traversal attacks. Files are served only from allowed directories, never outside project context.

Secret Masking

All MCP calls are logged with secret masking and prompt/query truncation. Sensitive data never appears in plain logs.

Readonly Mode

Readonly mode blocks all Write tools, enabling safe audit runs without any risk of accidental state mutations.

Token-scoped Access

Each MCP token is scoped to a single project. Tokens cannot cross project boundaries — no lateral access between repos.

Give your AI agents
real context.

Connect Mimiran to your project and every MCP tool is immediately available in Cursor, Windsurf, Claude Code, and any other MCP-compatible agent.