# is_mcp_tool

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/auto_mode/is_mcp_tool)

Return whether a tool carries dcode's MCP wrapper marker.

## Signature

```python
is_mcp_tool(
    tool: object,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `tool` | `object` | Yes | Resolved LangChain tool. |

## Returns

`bool`

Whether the tool is known to come from MCP discovery.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e4c1ffe9ee63d7854147de490ca27495ef157a7b/libs/code/deepagents_code/auto_mode.py#L714)