# MCPToolItem

> **Class** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPToolItem)

A selectable tool item in the MCP viewer.

## Signature

```python
MCPToolItem(
    self,
    name: str,
    description: str,
    index: int,
    *,
    classes: str = '',
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | `str` | Yes | Tool name. |
| `description` | `str` | Yes | Full tool description. |
| `index` | `int` | Yes | Flat index of this tool in the list. |
| `classes` | `str` | No | CSS classes. (default: `''`) |

## Extends

- `Static`

## Constructors

```python
__init__(
    self,
    name: str,
    description: str,
    index: int,
    *,
    classes: str = '',
) -> None
```

| Name | Type |
|------|------|
| `name` | `str` |
| `description` | `str` |
| `index` | `int` |
| `classes` | `str` |


## Properties

- `tool_name`
- `tool_description`
- `index`

## Methods

- [`toggle_expand()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPToolItem/toggle_expand)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPToolItem/on_mount)
- [`on_resize()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPToolItem/on_resize)
- [`on_click()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPToolItem/on_click)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/a827cddf72d72e4b17921b8eb445a3bfb0511cb4/libs/cli/deepagents_cli/widgets/mcp_viewer.py#L25)