{"version":"2.1.287","anchor":"plugin-function-hooks-type-root-now-takes-the-tool-list-err","canonical_anchor":"plugin-function-hooks-type-root-now-takes-the-tool-list-err","heading":"Plugin function hooks now get the tool list when their type definitions are set up","tier":"internal","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.287\/e\/plugin-function-hooks-type-root-now-takes-the-tool-list-err","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.287","markdown":"### Plugin function hooks now get the tool list when their type definitions are set up\n\nType definitions for plugin function hooks now receive the list of tools, and setup failures now log the error code\n\n**Unclear.** It is not clear whether hook authors see any difference beyond the extra error code in failure messages.\n\n**What**\n\nPlugins can add hooks, which are pieces of code that run automatically at set points while Claude Code works. Some of these hooks are written as functions, and Claude Code prepares a set of type definitions for them. Type definitions are descriptions of what the hook code can expect to receive. Two things are different:\n\n- Type definition setup: Claude Code now passes the list of available tools, not only the version. Tools are the actions Claude can take, such as reading a file or running a command.\n\n- Failure messages: when setup fails, the logged message now starts with the error code, unless the message already contains it.\n\n**Why**\n\nThe type definitions for these hooks can now reflect which tools exist. When setup goes wrong, the error code in the log makes the failure easier to identify.\n\n- Area: Hooks\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5"}