PostToolUse

An after-tool-call hook that runs shell commands when matching Carta-related MCP tools finish. A hook is an automatic action triggered by a defined event.

In plain words
What is it for?
Running cache-commands and track-corporation actions after matching Carta tool calls.
Why use it?
It automates follow-up processing after selected Carta operations instead of relying on someone to run those commands manually.

Hook

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add hooks/carta/plugins/post-tool-use
Clone the repo
git clone --depth 1 https://github.com/carta/plugins
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan A 0 findings. Scan, not verified.
Origin 89% copy Near-identical to another mod in the catalogue.
Security

Grade A, and why

PostToolUse scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the commands this hook runs, not an audit. A hook is shell that executes on your machine at the event it names, which is why every command in it is printed with what was found.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

89% identical to PreToolUse — 15 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/carta-cap-table/hooks/hooks.json · 19 lines

What it actually says

{
  "PostToolUse": [
    {
      "matcher": "mcp__(.*[Cc]arta.*|2827383e-1775-4df3-b6ff-04d5392f6d18|640916d9-5e0c-4d0b-830a-03500fa93e5e|1af3c326-9402-463c-ba5c-d62de59cf57b|8eb65db0-0cbd-4f50-833b-3057c150d41a|33b9b857-8443-4b2d-b191-2d9b6c50eb86)__.*",
      "hooks": [
        {
          "type": "command",
          "command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/dispatch.sh\" cache-commands",
          "timeout": 5
        },
        {
          "type": "command",
          "command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/dispatch.sh\" track-corporation",
          "timeout": 5
        }
      ]
    }
  ]
}
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 19 lines scan A 602130b02e39

Subscribe to this mod's changes

PostToolUse is a hook published in the GitHub repository carta/plugins (12 stars, last pushed 3d ago), licensed Apache-2.0. Its token cost is not measured: a hook is shell that never enters the context. A static security scan graded it A with 0 findings. It is 89% identical to PreToolUse, differing in 15 lines, and is treated as a copy.