# AgentServiceBaseTool

> **Class** in `langchain_azure_ai`

📖 [View in docs](https://reference.langchain.com/python/langchain-azure-ai/agents/_v2/prebuilt/tools/AgentServiceBaseTool)

A tool that interacts with Azure AI Foundry Agent Service V2.

Use this class to wrap tools from Azure AI Foundry for use with
PromptBasedAgentNodeV2.

Example:
```python
from langchain_azure_ai.agents.prebuilt.tools_v2 import AgentServiceBaseToolV2
from azure.ai.projects.models import CodeInterpreterTool

code_interpreter_tool = AgentServiceBaseTool(tool=CodeInterpreterTool())
```

Some tools require extra HTTP headers when calling the Responses API.
For example, ``ImageGenTool`` requires an
``x-ms-oai-image-generation-deployment`` header:

```python
from azure.ai.projects.models import ImageGenTool

image_tool = AgentServiceBaseToolV2(
    tool=ImageGenTool(model="gpt-image-1", quality="low", size="1024x1024"),
    extra_headers={
        "x-ms-oai-image-generation-deployment": "gpt-image-1",
    },
)
```

All ``extra_headers`` from every tool are merged and sent with each
``responses.create()`` call made by the agent node.

## Signature

```python
AgentServiceBaseTool()
```

## Extends

- `BaseModel`

## Properties

- `model_config`
- `tool`
- `extra_headers`
- `requires_approval`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-azure/blob/7a6a664d617264df8dcb12fcfb1bacc09f21d504/libs/azure-ai/langchain_azure_ai/agents/_v2/prebuilt/tools.py#L16)