Skip to main content
Glama

Write to a connected tool

write_to_tool
Destructive

Change data in a tool the person has connected to Unl — for example create or update a PostHog insight or dashboard, send a write request to a connected API, call an MCP tool that is not read-only, or create, correct or retire one of the person's own read-specs (provider 'unl', op 'amend_spec' / 'retire_spec'). Same keys as the get_from_unl tool with action='analytics': provider · op · body · target. For op 'http', body={method, path, query?, body?}; the request is signed server-side with the stored credential and sent only to the host verified when the tool was connected. Where op 'http' sends: posthog → the PostHog API (https://posthog.com/docs/api); sentry → the Sentry API (https://docs.sentry.io/api/); search_console → the Google Search Console API (https://developers.google.com/webmaster-tools/v1/api_reference_index); railway → the Railway public GraphQL API (https://docs.railway.com/reference/public-api); any other connected host → that tool's own API, the one the person named when they connected it. Every call needs nonce: the single-use write-nonce from connect_to_unl or from the previous write, and each successful write returns the next one. A deleting or otherwise destructive request (a DELETE, POST or PATCH, a GraphQL mutation, an MCP tool with no read-only annotation, or a body touching secret-shaped fields) is first shown back exactly as it will run, with nothing sent, and a confirm token; send the same call again with confirm= to run it once. Reads are refused here and cost no nonce — use the get_from_unl tool with action='analytics' for them. This tool never writes to the substrate.

Input Schema

NameRequiredDescriptionDefault
opNothe operation: http | create_insight | update_insight | create_dashboard (posthog) | amend_spec | retire_spec (unl) | <tool name> (mcp).
bodyNothe request: for op 'http', { method, path, query?, body? }; for a named op or an MCP tool, its payload/arguments.
nonceYesthe single-use write-nonce from connect_to_unl or the previous write's response. May also carry the confirmation_nonce returned by a preview when an older client cannot submit a named confirmation field; this preserves every confirmation check. Expires 600 seconds after issue. For field limits and preconditions, use the get_from_unl tool with action="constraints" and q=<field name>. Prepare the payload first; after a long composition, make a successful read to obtain a fresh nonce immediately before writing. Use the newest returned nonce; never reuse it for a different write.
targetNothe object or connection it applies to (e.g. an insight's numeric id, an MCP connection's name, a read-spec's read_key).
confirmNothe confirm token a destructive request returned the first time, bound to that exact request; resend the same call with it to run it. Never reuse one.
providerNothe connected tool: posthog | sentry | search_console | railway | mcp | unl | a connected tool's host. Default 'posthog'.
session_tokenNoTHIS chat's [unl-session:] token, echoed so the connection for the project this turn was read as is the one used.
analytics_nameNolegacy: a name folded into body for create ops.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / nonce / description
      Previous value: -"the single-use write-nonce from connect_to_unl or the previous write's response. Expires 600 seconds after issue. For field limits and preconditions, use the get_from_unl tool with action=\"constraints\" and q=<field name>. Prepare the payload first; after a long composition, make a successful read to obtain a fresh nonce immediately before writing. Use the newest returned nonce; never reuse it for a different write."New value: +"the single-use write-nonce from connect_to_unl or the previous write's response. May also carry the confirmation_nonce returned by a preview when an older client cannot submit a named confirmation field; this preserves every confirmation check. Expires 600 seconds after issue. For field limits and preconditions, use the get_from_unl tool with action=\"constraints\" and q=<field name>. Prepare the payload first; after a long composition, make a successful read to obtain a fresh nonce immediately before writing. Use the newest returned nonce; never reuse it for a different write."
  2. Changed1 schema field changed
    • changedInput schema / properties / nonce / description
      Previous value: -"the single-use write-nonce from connect_to_unl or the previous write's response."New value: +"the single-use write-nonce from connect_to_unl or the previous write's response. Expires 600 seconds after issue. For field limits and preconditions, use the get_from_unl tool with action=\"constraints\" and q=<field name>. Prepare the payload first; after a long composition, make a successful read to obtain a fresh nonce immediately before writing. Use the newest returned nonce; never reuse it for a different write."
  3. Changed1 schema field changed
    • changedInput schema / properties / session_token / description
      Previous value: -"THIS chat's [unl-session:] token, echoed so the connection for the venture declared at connect is the one used."New value: +"THIS chat's [unl-session:] token, echoed so the connection for the project this turn was read as is the one used."
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, but the description adds substantial context beyond them: destructive calls are previewed exactly as they will run with nothing sent, a confirm token is returned and must be resent, requests are signed server-side against the verified host, nonces are single-use and expire in 600s, and the tool never writes to the substrate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is dense but front-loads the core purpose and the read/write split before the operational details. The provider-to-API-URL listing is long, though defensible for an open-world write tool where the agent must know where a request lands. No sentence is purely filler, but it is heavier than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, open-world, destructive write tool with no output schema, the description covers the full lifecycle: nonce acquisition, preview/confirm for mutations, per-provider routing, and the read refusal path. The only unaddressed area, return payload shape, is partly handled by noting each successful write returns the next nonce.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains the shared key layout with get_from_unl (provider · op · body · target), the shape of body for op 'http' ({method, path, query?, body?}), and maps each provider to the specific API host that receives the request.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Change data in a tool the person has connected to Unl' — and enumerates concrete write scenarios (PostHog insights/dashboards, signed HTTP writes, non-read-only MCP tools, read-spec amendments). It explicitly distinguishes itself from the sibling get_from_unl, which handles reads, so an agent can route without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use (create/update/delete across connected tools) and when-not ('Reads are refused here and cost no nonce — use the get_from_unl tool with action=\'analytics\''). It also names the required nonce source and the destructive-request confirmation loop, so invocation conditions are fully specified.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.