# insert_equation

[MAINTENANCE] 51a595e7 — write an OMML equation DIRECTLY into a stored document's source .docx (real OOXML write-back), collapsing the manual resolve->open->parse->splice->rewrite->reindex flow into one call. The document must already be stored in the doc-structure store via ingest_document (which registers a docx/latex document's structure here) AND have a filesystem source path to write back to. Locate the target paragraph by para_id — the paragraph's w14:paraId (or the synthesized 'p{index}' id that get_document_structure / find_similar_equation surface as element_id). equation_id_or_omml is resolved in order: the id of an equation already indexed for THIS document (its stored OMML is reused); else a string starting with '<' is raw OMML XML; else a LaTeX source (converted best-effort via latex2mathml -> MathML -> OOXML). position controls placement: 'append' (default) drops the <m:oMath> inline at the end of the paragraph; 'before'/'after' add it as its own display-equation paragraph adjacent to the target. After the write the document's equation index is resynced from the modified file (no separate re-verify step). Returns {document_id, source, para_id, position, omml, resync} on success, or {error} for a bad para_id / unresolvable equation / missing file (the file is never mutated when resolution fails). Persistent-state disclosure: on hosted Meridian, supplied text and project/session metadata are sent to and stored in Meridian's service; self-hosted deployments keep them in the configured local SQLite/Postgres database. This data is visible in the dashboard/API and later project context or handoffs. Delete individual tasks, notes, or decisions where supported, or delete the project/account using the documented controls. Do not include secrets.

Agent View of the PolicyLayer registry record for `insert_equation`. HTML page: https://policylayer.com/tools/io-github-ajc3xc-meridian/insert-equation

## Facts

- Tool: `insert_equation`
- Server: Meridian (`@meridianmcp/mcp`) — https://policylayer.com/tools/io-github-ajc3xc-meridian.md
- Install: `npx -y @meridianmcp/mcp`
- Homepage: https://github.com/meridianmcp/Meridian
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server CORS policy: *
- Server rate-limited: no
- Parameters: 6 (3 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `doc` | string | yes | The stored document's source (the path you ingested it under via ingest_document; must resolve to a .docx on disk). |
| `para_id` | string | yes | Target paragraph id — its w14:paraId, or the synthesized 'p{index}' id surfaced as element_id by the read tools. |
| `position` | string | no | Where to place the equation relative to the paragraph. Default 'append' (inline, end of paragraph). |
| `project_id` | string | no |  |
| `project_name` | string | no | Project name — an alternative to project_id; resolved to the id internally. project_id wins if both are given. |
| `equation_id_or_omml` | string | yes | An existing indexed equation id (reuses its OMML), OR raw OMML XML (starts with '<'), OR a LaTeX source string. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "insert_equation",
    "arguments": {
      "doc": "<doc>",
      "para_id": "<para_id>",
      "equation_id_or_omml": "<equation_id_or_omml>"
    }
  }
}
```

## Why insert_equation is rated Medium

This tool creates or modifies data (OOXML equations in .docx documents) with reversible effects—equations can be edited or removed. It does not delete irreversibly, execute arbitrary code, or move money.

From the tool's own definition: "Tool description explicitly states 'write an OMML equation DIRECTLY into a stored document's source .docx (real OOXML write-back)' and 'rewrite' operations that modify filesystem source paths."

## Use case

AI agents use insert_equation to create or update resources in Meridian, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Meridian environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Meridian:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "insert_equation": {
      "limits": [
        {
          "counter": "insert_equation_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Meridian (174)

- `archive_decision` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/archive-decision.md
- `batch_mutate` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/batch-mutate.md
- `claim_sprint_item` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/claim-sprint-item.md
- `clear_capability_profile` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/clear-capability-profile.md
- `clone_profile_layer` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/clone-profile-layer.md
- `delete_custom_hook` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/delete-custom-hook.md
- `delete_note` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/delete-note.md
- `delete_sprint_item_pointer` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/delete-sprint-item-pointer.md
- `fan_out_sprint_items` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/fan-out-sprint-items.md
- `purge_ai_log` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/purge-ai-log.md
- `record_handoff_correction` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/record-handoff-correction.md
- `release_docx_region_claims` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/release-docx-region-claims.md
- `request_hitl` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/request-hitl.md
- `reset_plugin_override` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/reset-plugin-override.md
- `reset_profile_layer` — Destructive — https://policylayer.com/tools/io-github-ajc3xc-meridian/reset-profile-layer.md
- `complete_wave_gate` — Execute — https://policylayer.com/tools/io-github-ajc3xc-meridian/complete-wave-gate.md
- `execute_batch` — Execute — https://policylayer.com/tools/io-github-ajc3xc-meridian/execute-batch.md
- `prospect_symbol` — Execute — https://policylayer.com/tools/io-github-ajc3xc-meridian/prospect-symbol.md
- `run_verification` — Execute — https://policylayer.com/tools/io-github-ajc3xc-meridian/run-verification.md
- `start_session` — Execute — https://policylayer.com/tools/io-github-ajc3xc-meridian/start-session.md
- `analyze_model_efficiency` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/analyze-model-efficiency.md
- `analyze_sprint` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/analyze-sprint.md
- `batch_read` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/batch-read.md
- `find_outputs_by_source` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/find-outputs-by-source.md
- `find_similar_equation` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/find-similar-equation.md
- `find_similar_figure` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/find-similar-figure.md
- `find_similar_table` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/find-similar-table.md
- `find_symbol_usages` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/find-symbol-usages.md
- `get_agent_instructions` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/get-agent-instructions.md
- `get_blog_posts` — Read — https://policylayer.com/tools/io-github-ajc3xc-meridian/get-blog-posts.md
- …and 144 more: https://policylayer.com/tools/io-github-ajc3xc-meridian.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-github-ajc3xc-meridian · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-ajc3xc-meridian
