inference-hooks-endpoint changedmanage-claude/inference-hooks-endpoint
Nearest release: v2.1.333, published 4 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+37added
Lines−124removed
From line
246
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits24to this page, all time
### What `tool_info` tells you ### Write rules that keep working ### Platform tools ### Application tools ### Third-party tools ### Client tools
The whole hunk
from line 246, old and new numbered
/
from line 246
246246
247247## The tool call frame
248248
249When Claude produces tool calls, Anthropic sends one tool call frame that lists them. Calls to some of claude.ai’s own tools may be left out, and a response whose only tool calls are left out doesn’t produce a tool call frame; see [Availability](https://platform.claude.com/docs/en/manage-claude/inference-hooks#availability). One verdict covers the whole frame: you can’t allow some tool calls and deny others. The frame goes to the same endpoint as the prompt frame, with the same headers, signature, and top-level fields. Tool calls made by code that Claude runs in the code execution tool are sent the same way, in separate tool call frames, before they run.
249When Claude produces tool calls, Anthropic sends one tool call frame that lists them. One verdict covers the whole frame: you can’t allow some tool calls and deny others. The frame goes to the same endpoint as the prompt frame, with the same headers, signature, and top-level fields. Code that Claude runs in the code execution tool can make tool calls too. Anthropic sends those in separate tool call frames before they run.
250250
251It differs from the prompt frame in three ways:
251Some tool calls might be left out, and a response with only such calls produces no tool call frame. See [Availability in the Inference hooks overview](https://platform.claude.com/docs/en/manage-claude/inference-hooks#availability).
252252
253The frame differs from the prompt frame in three ways:
254
253255* `type` is `"tool_call"`.
254256* `messages` holds only the latest message, the `assistant` message Claude just produced: any `text` blocks and one `tool_use` block for each tool call the frame lists, in the order the model produced them. Earlier conversation is left out, because the prompt frame sent before that model call carried it. Read the last entry of `messages`, because the protocol may later add earlier messages before it.
255257* Each `tool_use` block carries a `tool_info` object that says who runs or provides the tool.
from line 258
256258
257259Where `session_id` is set, it is the same on both frames. The tool call frame has its own `request_id`, which is opaque like the prompt frame’s.
258260
259`tool_info` says who runs or provides the tool, not what the tool can reach. It is one of four kinds, told apart by its `type` field, and each kind carries its own fields. Anthropic sends the first of the following kinds that fits the tool. New kinds may appear: accept a `type` you don’t recognize, and for such a kind rely only on `type`.
261The frame holds each call’s arguments, not its result. A result reaches your server only when it is sent back to Claude in a `tool_result` block of a later prompt frame. Some results are replaced by a placeholder.
260262
261An optional field that doesn’t apply is left out, never `null`, so a `tool_info` can be just `{"type": "client"}`. `tool_name` is chosen by whoever defined the tool, and a server’s `toolset_name` by whoever wrote the request or named the connector. Don’t treat either as a trust boundary.
263### What `tool_info` tells you
262264
263### Platform tools
265`tool_info` says who runs or provides the tool, not what the tool can reach. Only `type` is on every tool. A field that doesn’t apply or isn’t known is left out, never `null`, so a `tool_info` can be just `{"type": "client"}`.
264266
265A platform tool is one that the Claude API itself runs while it serves the request, such as web search or code execution.
266
267| Field | Present | Description |
267| Field | Present on | Description |
268268| ----- | ----- | ----- |
269| `type` | Always | `"platform"` |
270| `tool_type` | Always | The tool’s versioned type, such as `web_search_20250305`. Match it exactly; don’t parse a name or a date out of it. |
271| `toolset_name` | Optional | The group of tools it belongs to. |
269| `type` | Every tool | One of the values in the next table. New values might appear. Return a verdict, not an error, for one you don’t recognize. Don’t expect any other field with it. |
270| `tool_type` | Every platform tool and some client tools | The versioned type of a tool that Anthropic defines, such as `web_search_20250305`. Match it exactly; don’t parse a name or a date out of it. |
271| `toolset_name` | Some tools | A name for the server or group of tools that the tool belongs to. It isn’t a stable identifier. |
272| `origin` | Some third-party tools | The scheme, host, and non-default port of the server’s URL. It can be a private or local address, `localhost` included. An absent `origin` means unknown, not safe. |
273| `verified_origin` | Every tool that has `origin` | `true` only when Anthropic connects to the server itself. `false` means only that Anthropic hasn’t confirmed the origin. |
272274
273### Application tools
275`type` has one of these values:
274276
275An application tool is one that the Anthropic application making the request provides itself, such as claude.ai’s own tools.
277| Value | Meaning |
278| ----- | ----- |
279| `"platform"` | The Claude API runs the tool while it serves the request. |
280| `"application"` | Anthropic runs the tool as part of the application that made the request. |
281| `"third_party"` | The tool is on a server that Anthropic knows of, such as a connector or an MCP server. This doesn’t mean Anthropic has vetted the server. |
282| `"client"` | Any other tool, usually one that the application calling Claude runs. |
276283
277| Field | Present | Description |
278| ----- | ----- | ----- |
279| `type` | Always | `"application"` |
280| `toolset_name` | Optional | The group of tools it belongs to. |
284An example `tool_use` block for a tool on an MCP server:
281285
282A `tool_use` block for a web search tool that claude.ai provides itself:
283
284286```json
285287{
286288 "type": "tool_use",
287 "id": "toolu_01LmNoPqRsTuVwXyZaBcDeFg",
288 "tool_name": "web_search",
289 "input": {
290 "query": "comparable deals for unannounced 4.2B USD Acme Corp acquisition"
291 },
292 "tool_info": {
293 "type": "application"
294 }
295}
296```
297
298claude.ai doesn’t always name this tool `web_search`, so don’t match on the name alone. `input` always includes the search query and can hold other fields.
299
300### Third-party tools
301
302A third-party tool is one on a server that Anthropic knows of, such as a claude.ai connector or an MCP server that the request names in `mcp_servers`. This doesn’t mean Anthropic has vetted the server. In voice mode, a call to a claude.ai connector’s tool is `"client"` instead.
303
304| Field | Present | Description |
305| ----- | ----- | ----- |
306| `type` | Always | `"third_party"` |
307| `toolset_name` | Optional | For a server in `mcp_servers`, the name the request gives the server. For any other server, such as a claude.ai connector, the server’s name, copied from `tool_name`. |
308| `origin` | Optional | The scheme, host, and non-default port of the server’s URL. It can be a private or local address, `localhost` included. An absent `origin` means unknown, not safe. |
309| `verified_origin` | Whenever `origin` is | `true` only when Anthropic’s servers connect to the server themselves. Treat `false` as an origin that Anthropic hasn’t confirmed. |
310
311A `tool_use` block for a tool on an MCP server that the request names `crm` in `mcp_servers`:
312
313```json
314{
315 "type": "tool_use",
316289 "id": "toolu_01GhIjKlMnOpQrStUvWxYzAb",
317290 "tool_name": "crm_search",
318291 "input": {
from line 300
327300}
328301```
329302
330A `tool_use` block for a tool on a Gmail connector, called in a claude.ai chat:
303### Write rules that keep working
331304
332```json
333{
334 "type": "tool_use",
335 "id": "toolu_01DeFgHiJkLmNoPqRsTuVwXy",
336 "tool_name": "mcp__Gmail__search_threads",
337 "input": {
338 "query": "from:[email protected] newer_than:30d"
339 },
340 "tool_info": {
341 "type": "third_party",
342 "toolset_name": "Gmail",
343 "origin": "https://gmail.mcp.example.com",
344 "verified_origin": false
345 }
346}
347```
305The protocol defines the fields on this page. It doesn’t define which values a given tool arrives with. A tool’s `tool_name`, `input` fields, and `tool_info` values can differ between Claude products and between conversations, and they can change over time. These practices keep your rules working:
348306
349For a claude.ai connector, `verified_origin` can be `false` even when Anthropic’s servers connect to the server themselves.
350
351A name copied from `tool_name` can differ from the name the user sees: `mcp__Google_Drive__search_files` gives `Google_Drive`, not `Google Drive`. It can also end in a short suffix (`Gmail-1a2b3c4d`), for example when another of the user’s connectors has the same name. The name isn’t a stable identifier and doesn’t prove which server the tool is on. When `tool_name` has no server name in it, `toolset_name` is left out.
352
353### Client tools
354
355A client tool is any other tool, usually one that the application calling Claude runs. A tool that Anthropic defines but the calling application runs, such as bash or computer use, is a client tool too, and carries its versioned type in `tool_type`. A call to a tool the request doesn’t declare is also `"client"`.
356
357A tool on an MCP server that Claude Code connects to directly from the user’s computer, such as a local MCP server, is a client tool. Its `tool_info` is `{"type": "client"}`, and its `tool_name` is the name Claude Code gives it, in the form `mcp__<server>__<tool>`.
358
359A deny stops the call before Claude Code runs it. The exchange between Claude Code and a local server doesn’t pass through Anthropic, so your AI security server sees the tool’s result only when Claude Code sends it back. Its text is then in a `tool_result` block in the next prompt frame.
360
361| Field | Present | Description |
362| ----- | ----- | ----- |
363| `type` | Always | `"client"` |
364| `tool_type` | Optional | The tool’s versioned type, such as `bash_20250124`, when Anthropic defines the tool. Match it exactly; don’t parse a name or a date out of it. |
365| `toolset_name` | Optional | The group of tools it belongs to, such as `browser`. |
366
367A `tool_use` block for a tool that the calling application declares:
368
369```json
370{
371 "type": "tool_use",
372 "id": "toolu_01AbCdEfGhIjKlMnOpQrStUv",
373 "tool_name": "read_file",
374 "input": {
375 "path": "reports/q3.txt"
376 },
377 "tool_info": {
378 "type": "client"
379 }
380}
381```
382
383A `tool_use` block for bash, which Anthropic defines and the calling application runs:
384
385```json
386{
387 "type": "tool_use",
388 "id": "toolu_01HiJkLmNoPqRsTuVwXyZaBc",
389 "tool_name": "bash",
390 "input": {
391 "command": "ls -la reports/"
392 },
393 "tool_info": {
394 "type": "client",
395 "tool_type": "bash_20250124"
396 }
397}
398```
307* **Scan all of `input` for sensitive content.** This works however the tool is labeled.
308* **Deny when any one value matches.** A rule that needs several values to match lets the call through when one of them differs or is missing.
309* **Don’t allow on a name or `tool_info.type` alone.** Another tool can have the same values. Only an `origin` with `verified_origin` set to `true` confirms the server’s address.
310* **Choose a verdict for calls that match no rule.** Expect names you haven’t seen.
311* **Check your rules against your own traffic.** Log the `tool_name` and `tool_info` values you receive and review them regularly.
399312
400313## Return a verdict
401314
No line in this hunk matches that.