Atif Ali
bd5b62c976
feat: expose MCP tool annotations for tool grouping ( #23195 )
...
## Summary
- add shared MCP annotation metadata to toolsdk tools
- emit MCP tool annotations from both coderd and CLI MCP servers
- cover annotation serialization in toolsdk, coderd MCP e2e, and CLI MCP
tests
## Why
- Coder already exposed MCP tools, but it did not populate MCP tool
annotation hints (`readOnlyHint`, `destructiveHint`, `idempotentHint`,
`openWorldHint`).
- Hosts such as Claude Desktop use those hints to classify and group
tools, so without them Coder tools can get lumped together.
- This change adds a shared annotation source in `toolsdk` and has both
MCP servers emit those hints through `mcp.Tool.Annotations`, avoiding
drift between local and remote MCP implementations.
## Testing
- Tested locally on Cladue Desktop and the tools are categorized
correctly.
<table>
<tr>
<td> Before
<td> After
<tr>
<td> <img width="613" height="183" alt="image"
src="https://github.com/user-attachments/assets/29d2e3fb-53bc-4ea7-bdb3-f10df4ef996b "
/>
<td> <img width="600" height="457" alt="image"
src="https://github.com/user-attachments/assets/cc384036-c9a7-4db9-9400-43ad51920ff5 "
/>
</table>
Note: Done using Coder Agents, reviewed and tested by human locally
2026-03-18 10:21:45 +00:00
..
2026-01-08 15:24:11 +04:00
2026-03-12 08:33:09 -06:00
2026-03-05 09:35:57 -08:00
2025-06-24 11:16:31 +02:00
2024-02-26 10:03:49 -06:00
2026-01-08 15:24:11 +04:00
2026-03-12 13:39:24 -06:00
2026-03-11 15:19:56 +02:00
2023-09-04 21:42:45 +03:00
2026-03-17 14:07:20 -08:00
2025-06-20 13:16:55 -06:00
2026-03-03 21:23:59 +04:00
2026-03-03 21:23:59 +04:00
2025-10-27 17:07:25 +01:00
2025-06-20 13:16:55 -06:00
2025-09-22 17:14:07 +04:00
2024-08-22 15:40:53 +10:00
2025-09-29 17:01:54 +04:00
2025-06-06 16:44:25 +04:00
2025-07-03 11:28:00 -06:00
2025-06-06 16:44:25 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-03-16 11:54:30 -06:00
2026-03-16 11:54:30 -06:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2026-03-18 10:21:45 +00:00
2026-03-18 10:21:45 +00:00
2026-03-05 09:35:57 -08:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2026-02-02 16:16:16 +02:00
2026-01-08 15:24:11 +04:00
2026-03-10 12:08:40 +02:00
2026-01-08 15:24:11 +04:00
2026-02-25 11:16:20 -06:00
2024-03-17 09:45:26 -05:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-03-13 20:37:41 -07:00
2025-03-26 01:56:39 -05:00
2025-09-03 10:49:19 +04:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2025-09-03 10:38:42 +04:00
2026-03-02 22:52:39 -05:00
2026-03-10 12:12:15 +02:00
2025-09-03 10:49:19 +04:00
2025-03-26 01:56:39 -05:00
2023-09-08 18:21:33 +00:00
2025-12-15 09:40:59 -07:00
2026-02-23 08:30:32 -08:00
2025-12-03 11:32:59 +02:00
2026-03-10 15:40:54 +02:00
2026-03-10 15:40:54 +02:00
2025-05-12 11:45:24 -07:00
2025-10-30 17:41:08 -06:00
2026-01-08 15:24:11 +04:00
2026-02-03 09:45:23 +00:00
2024-06-13 10:19:36 +04:00
2025-09-22 17:14:07 +04:00
2025-09-11 15:08:57 +02:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-12-22 11:28:31 +00:00
2026-01-07 16:06:00 +00:00
2026-02-06 14:09:39 +11:00
2026-02-06 14:09:39 +11:00
2026-02-05 19:35:20 +11:00
2026-02-06 14:09:39 +11:00
2025-09-22 17:14:07 +04:00
2024-08-20 14:47:46 +10:00
2025-12-03 11:32:59 +02:00
2024-05-23 07:54:59 -10:00
2026-03-17 12:16:43 -07:00
2026-03-04 11:14:52 -07:00
2023-08-09 13:00:25 +02:00
2025-07-28 14:46:04 +01:00
2026-02-26 14:34:30 +01:00
2026-02-26 14:34:30 +01:00
2025-07-03 13:22:54 +10:00
2025-02-24 05:38:17 +00:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-06-27 14:42:22 +04:00
2026-01-08 15:24:11 +04:00
2025-10-06 08:56:43 +00:00
2025-12-03 11:32:59 +02:00
2026-03-03 08:47:34 +00:00
2025-12-03 11:32:59 +02:00
2023-08-18 18:55:43 +00:00
2026-01-08 15:24:11 +04:00
2025-03-26 01:56:39 -05:00
2024-07-30 10:44:02 -06:00
2026-01-08 15:24:11 +04:00
2024-03-17 09:45:26 -05:00
2024-11-04 17:23:31 +01:00
2026-01-08 15:24:11 +04:00
2025-12-15 11:26:41 -06:00
2025-09-22 17:14:07 +04:00
2025-06-20 13:16:55 -06:00
2026-01-12 17:46:05 +00:00
2026-03-12 08:33:09 -06:00
2025-06-20 13:16:55 -06:00
2025-10-24 10:18:19 +00:00
2025-12-03 11:32:59 +02:00
2024-11-04 17:23:31 +01:00
2026-03-11 10:19:08 -07:00
2026-03-04 20:26:03 -05:00
2025-10-23 14:24:54 +02:00
2026-01-08 15:24:11 +04:00
2024-03-17 09:45:26 -05:00
2026-03-10 18:46:01 +00:00
2026-03-10 18:46:01 +00:00
2026-02-23 08:30:32 -08:00
2026-01-08 15:24:11 +04:00
2026-01-16 15:45:33 +00:00
2026-01-16 15:45:33 +00:00
2024-03-15 13:16:36 +00:00
2024-03-15 13:16:36 +00:00
2024-11-18 14:09:22 +04:00
2026-01-08 15:24:11 +04:00
2026-02-09 09:56:33 +00:00
2023-07-20 12:05:39 +02:00
2026-03-12 18:07:52 +02:00
2023-07-20 12:05:39 +02:00
2026-03-10 12:08:40 +02:00
2026-01-30 13:24:06 +11:00
2026-02-24 19:51:48 -05:00
2025-03-26 10:36:53 +00:00
2025-03-26 10:36:53 +00:00
2026-02-23 22:46:17 -06:00
2026-01-12 15:16:59 +01:00
2025-09-22 17:14:07 +04:00
2026-01-20 10:28:52 +11:00
2026-01-20 10:28:52 +11:00
2025-11-28 08:33:50 +02:00
2025-11-28 08:33:50 +02:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-03-12 18:07:52 +02:00
2026-01-08 15:24:11 +04:00
2025-11-28 08:33:50 +02:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-12-03 11:32:59 +02:00
2026-03-07 01:36:03 +00:00
2026-02-02 15:50:09 +02:00
2026-03-07 01:36:03 +00:00
2026-02-13 14:21:31 +00:00
2026-03-07 01:36:03 +00:00
2026-02-17 16:24:13 +00:00
2026-03-07 01:36:03 +00:00
2026-03-07 01:36:03 +00:00
2026-03-12 08:33:09 -06:00
2026-03-12 08:33:09 -06:00
2026-03-07 01:36:03 +00:00
2026-02-17 16:24:13 +00:00
2024-07-25 16:07:53 -05:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2023-08-18 18:55:43 +00:00
2024-03-17 09:45:26 -05:00
2024-07-25 16:07:53 -05:00
2025-12-03 11:32:59 +02:00
2025-12-15 11:26:41 -06:00
2025-12-03 11:32:59 +02:00
2025-06-20 13:16:55 -06:00
2025-09-22 17:14:07 +04:00
2025-12-15 11:26:41 -06:00
2025-10-03 10:20:06 -05:00
2025-07-24 16:44:36 +01:00
2025-12-15 11:26:41 -06:00
2025-09-22 17:14:07 +04:00
2026-02-19 09:31:12 +11:00
2026-02-19 09:31:12 +11:00
2026-03-06 00:04:09 +00:00
2026-02-24 15:27:03 +00:00
2026-02-24 09:15:02 +01:00
2025-09-22 17:14:07 +04:00
2024-08-23 21:23:51 +00:00
2026-03-17 14:07:20 -08:00
2026-03-17 14:07:20 -08:00
2025-09-22 17:14:07 +04:00
2025-04-15 18:30:20 -04:00
2025-09-22 17:14:07 +04:00
2025-05-12 11:45:24 -07:00
2025-12-03 11:32:59 +02:00
2025-04-15 18:30:20 -04:00
2023-10-10 11:14:20 +01:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2024-11-18 21:10:01 +10:00
2024-11-18 14:09:22 +04:00
2026-01-08 15:24:11 +04:00
2024-07-09 13:23:11 -05:00
2025-09-26 11:20:25 +01:00