{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/docs/mcp/safety/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#safety--write-access\" aria-label=\"safety  write access permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"safety--write-access\"></div>Safety &#x26; Write Access</h1>\n<h2 style=\"position:relative;\"><a href=\"#read-only-by-default\" aria-label=\"read only by default permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"read-only-by-default\"></div>Read-Only by Default</h2>\n<p>The hosted Shipwell MCP Server ships with all write tools disabled. Out of the box, your AI assistant can query and read any data your token has access to, but it cannot create, update, or delete anything.</p>\n<p>This is intentional — AI agents should not be able to mutate production freight data without an explicit decision to enable that capability. Read-only access requires no additional configuration beyond a valid Shipwell API token.</p>\n<div class=\"admonition admonition-info\"><div class=\"admonition-heading\"><h5><span class=\"admonition-icon\"><i></i></span>Note</h5></div><div class=\"admonition-content\"><p>Even with write access enabled at the account level, the actual permissions available to the AI are bounded by the Shipwell platform permissions set on the user whose token you supply. If that user cannot edit shipments in the Shipwell app, the AI cannot edit them through MCP either. See <a href=\"/docs/mcp/best-practices/\">Best Practices</a> for how to set this up with a dedicated integration user.</p></div></div>\n<h2 style=\"position:relative;\"><a href=\"#enabling-write-access\" aria-label=\"enabling write access permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"enabling-write-access\"></div>Enabling Write Access</h2>\n<p>Write access must be explicitly enabled — it is not on by default, even if your account supports it. Contact your Shipwell account representative to turn on write tools for your account.</p>\n<p>Once enabled, write tools become available automatically to agents authenticating with your API token. Write tools cover:</p>\n<ul>\n<li>\nCreating and updating shipments, stops, and carrier assignments\n</li>\n<li>\nCreating and updating orders\n</li>\n<li>\nCreating notes and messages\n</li>\n<li>\nFull CRUD on facilities, dock appointments, routing guides, and custom fields\n</li>\n</ul>\n<p>Contact your Shipwell account representative to enable write access.</p>\n<h2 style=\"position:relative;\"><a href=\"#dry-run-mode\" aria-label=\"dry run mode permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"dry-run-mode\"></div>Dry-Run Mode</h2>\n<p>Before enabling live writes, use dry-run mode to simulate any write operation without side effects:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"56151214787081740000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`SHIPWELL_MCP_DRYRUN=true`, `56151214787081740000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-56151214787081740000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token assign-left variable\">SHIPWELL_MCP_DRYRUN</span><span class=\"token operator\">=</span>true</code></pre></div>\n      </div>\n<p>In dry-run mode the agent runs in full simulation — every write tool executes its pre-flight checks and planning logic but makes no actual API calls. Each simulated operation returns a structured risk report:</p>\n<ul>\n<li>\nIdentified side effects\n</li>\n<li>\nRequired state preconditions\n</li>\n<li>\nRisk level: \n<code class=\"language-text\">low</code>\n / \n<code class=\"language-text\">medium</code>\n / \n<code class=\"language-text\">high</code>\n / \n<code class=\"language-text\">critical</code>\n</li>\n</ul>\n<p>Use dry-run to build confidence in your agent's behavior before touching real freight data.</p>\n<h2 style=\"position:relative;\"><a href=\"#agent-safe-tool-design\" aria-label=\"agent safe tool design permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"agent-safe-tool-design\"></div>Agent-Safe Tool Design</h2>\n<p>Every write tool in the Shipwell MCP Server explicitly documents:</p>\n<ul>\n<li>\n<strong>Side effects</strong>\n — what downstream state changes to expect\n</li>\n<li>\n<strong>State preconditions</strong>\n — what must be true before the operation is valid\n</li>\n<li>\n<strong>Risk level</strong>\n — one of \n<code class=\"language-text\">low</code>\n, \n<code class=\"language-text\">medium</code>\n, \n<code class=\"language-text\">high</code>\n, or \n<code class=\"language-text\">critical</code>\n</li>\n</ul>\n<p>This metadata is surfaced to the AI agent at tool-discovery time, so the agent can reason about consequences before acting.</p>\n<h2 style=\"position:relative;\"><a href=\"#state-machine-reference\" aria-label=\"state machine reference permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"state-machine-reference\"></div>State Machine Reference</h2>\n<p>The server includes built-in tools and a machine-readable JSON resource that describe valid state transitions, locked fields, and side effects for every shipment, stop, and order status. Agents can call <code class=\"language-text\">get_shipment_state_info</code> (and equivalent tools for stops and orders) to check what actions are permitted before attempting a write.</p>\n<p>This prevents the agent from attempting invalid transitions — for example, trying to assign a carrier to a shipment that is already delivered.</p>","headings":[{"value":"Safety & Write Access","depth":1},{"value":"Read-Only by Default","depth":2},{"value":"Enabling Write Access","depth":2},{"value":"Dry-Run Mode","depth":2},{"value":"Agent-Safe Tool Design","depth":2},{"value":"State Machine Reference","depth":2}]},"contentItem":{"data":{"lastModified":"2026-05-14T19:02:55.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":true,"disableLastModified":false,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"c87ccac8-018b-5121-8f3e-2c8a82948699__redocly content/docs/mcp/safety/","seo":{"title":"Safety & Write Access","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"docs/mcp/safety.md","pageBaseUrl":"/docs/mcp/safety","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Safety & Write Access","id":"safety--write-access"},{"depth":2,"value":"Read-Only by Default","id":"read-only-by-default"},{"depth":2,"value":"Enabling Write Access","id":"enabling-write-access"},{"depth":2,"value":"Dry-Run Mode","id":"dry-run-mode"},{"depth":2,"value":"Agent-Safe Tool Design","id":"agent-safe-tool-design"},{"depth":2,"value":"State Machine Reference","id":"state-machine-reference"}]},"data":{"title":""},"catalogInfo":null,"link":"/docs/mcp/safety/","sidebarName":"developerPortal","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":null,"apiVersionId":null,"isDefaultApiVersion":null}},"staticQueryHashes":["1123603147","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3240152602","3743992808","561138138"]}