# Editor.Mcp.McpToolAttribute

Expose a static method as an MCP tool, callable by AI agents connected to the editor's
MCP server. The method name (converted to snake_case) becomes the tool name unless one
is given here, and the XML summary becomes the tool description the agent reads.
Parameters become the tool's input schema - describe them with [Description]. Tools are
invoked on the main thread and can return a Task to be async. Return values get serialized
to json for the agent - return a [Sandbox.Bitmap](/api/Sandbox.Bitmap) to send an image, or an
[Editor.Mcp.McpResult](/api/Editor.Mcp.McpResult) to compose text and images yourself.
Agents find tools through search_tools and run them through call_tool - so the name and
description are what make a tool discoverable.

- Kind: attribute
- Namespace: `Editor.Mcp`
- Assembly: `Sandbox.Tools`

## Constructors

- [`McpToolAttribute`](/api/Editor.Mcp.McpToolAttribute/.ctor)

## Properties

- [`Hints`](/api/Editor.Mcp.McpToolAttribute/Hints): Behaviour hints reported to the client, which may use them for permission prompts. A tool with no hints is assumed to write, and possibly destroy, state.
- [`Name`](/api/Editor.Mcp.McpToolAttribute/Name): The name agents call this tool by. Treat it as public API - agents and their workflows break when it changes.
