dial_langchain.tools

Classes

GetBillingTool

Base for Dial LangChain tools.

GetCallInput

GetCallTool

Base for Dial LangChain tools.

ListCallsInput

ListCallsTool

Base for Dial LangChain tools.

ListContactsInput

ListContactsTool

Base for Dial LangChain tools.

ListGroupsInput

No arguments — the account's own groups.

ListGroupsTool

Base for Dial LangChain tools.

ListMessagesInput

ListMessagesTool

Base for Dial LangChain tools.

ListNumbersTool

Base for Dial LangChain tools.

LookupNumberInput

LookupNumberTool

Base for Dial LangChain tools.

MakeCallInput

MakeCallTool

Base for Dial LangChain tools.

PurchaseNumberInput

PurchaseNumberTool

Base for Dial LangChain tools.

ReplyToMessageInput

ReplyToMessageTool

Base for Dial LangChain tools.

SendMessageInput

SendMessageTool

Base for Dial LangChain tools.

SetNumberPropertiesInput

SetNumberPropertiesTool

Base for Dial LangChain tools.

StartTypingTool

Base for Dial LangChain tools.

StopTypingTool

Base for Dial LangChain tools.

TypingInput

WaitForMessageInput

WaitForMessageTool

Base for Dial LangChain tools.

Module Contents

class dial_langchain.tools.GetBillingTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

description: str = "Get the account's billing status: credit balance, subscription (if any), each number's billing...
name: str = 'get_billing'
class dial_langchain.tools.GetCallInput

Bases: pydantic.BaseModel

call_id: str
class dial_langchain.tools.GetCallTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = 'Fetch a single call by its id, including its current status.'
name: str = 'get_call'
class dial_langchain.tools.ListCallsInput

Bases: pydantic.BaseModel

contact: str | None
direction: str | None
number_id: str | None
class dial_langchain.tools.ListCallsTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = "List recent inbound and outbound calls on the account. Pass contact to read one person's call history."
name: str = 'list_calls'
class dial_langchain.tools.ListContactsInput

Bases: pydantic.BaseModel

limit: int | None
number_id: str | None
starting_after: str | None
class dial_langchain.tools.ListContactsTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = "List every number the account's lines have exchanged a message or a call with, newest activity...
name: str = 'list_contacts'
class dial_langchain.tools.ListGroupsInput

Bases: pydantic.BaseModel

No arguments — the account’s own groups.

class dial_langchain.tools.ListGroupsTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = "List the group conversations your lines are in. A group is a conversation that isn't a phone...
name: str = 'list_groups'
class dial_langchain.tools.ListMessagesInput

Bases: pydantic.BaseModel

contact: str | None
direction: str | None
group_id: str | None
number_id: str | None
search: str | None
class dial_langchain.tools.ListMessagesTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = "List recent inbound and outbound messages on the account. Unfiltered this is the newest 100...
name: str = 'list_messages'
class dial_langchain.tools.ListNumbersTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

description: str = 'List all available Dial phone numbers on the account.'
name: str = 'list_numbers'
class dial_langchain.tools.LookupNumberInput

Bases: pydantic.BaseModel

number: str
class dial_langchain.tools.LookupNumberTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = "Check what channels a phone number can receive on, before sending to it. Works on ANY number in...
name: str = 'lookup_number'
class dial_langchain.tools.MakeCallInput

Bases: pydantic.BaseModel

from_number: str | None
from_number_id: str | None
idempotency_key: str | None
language: str | None
max_call_duration_seconds: int | None
outbound_instruction: str
to: str
transfer_to: str | None
voice_gender: str | None
class dial_langchain.tools.MakeCallTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = 'Initiate an AI voice call to a phone number.'
name: str = 'make_call'
class dial_langchain.tools.PurchaseNumberInput

Bases: pydantic.BaseModel

area_code: str | None
inbound_instruction: str
inbound_language: str | None
inbound_voice_gender: str | None
include_imessage: bool
class dial_langchain.tools.PurchaseNumberTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = 'Provision (buy) a new Dial phone number. Billable.'
name: str = 'purchase_number'
class dial_langchain.tools.ReplyToMessageInput

Bases: pydantic.BaseModel

body: str | None
message_id: str
reaction: str | None
class dial_langchain.tools.ReplyToMessageTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = 'Reply in-thread or react to an existing message. The reply goes out from the Dial number the...
name: str = 'reply_to_message'
class dial_langchain.tools.SendMessageInput

Bases: pydantic.BaseModel

body: str
channel: str | None
force_audio_file: bool
from_number: str | None
from_number_id: str | None
group_id: str | None
media_urls: list[str]
poll_options: list[str]
poll_title: str | None
to: str
class dial_langchain.tools.SendMessageTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = 'Send a message to a phone number or into a group conversation, optionally with media...
name: str = 'send_message'
class dial_langchain.tools.SetNumberPropertiesInput

Bases: pydantic.BaseModel

avatar_url: str | None
calling_enabled: bool | None
first_name: str | None
forward_to: str | None
inbound_instruction: str | None
inbound_language: str | None
inbound_voice_gender: str | None
last_name: str | None
max_call_duration_seconds: int | None
nickname: str | None
number_id: str
class dial_langchain.tools.SetNumberPropertiesTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = "Update a Dial phone number's properties: its inbound instruction (the system prompt its AI...
name: str = 'set_number_properties'
class dial_langchain.tools.StartTypingTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = "Show a typing indicator to the recipient, as if composing a message from your number. iMessage...
name: str = 'start_typing'
class dial_langchain.tools.StopTypingTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = "Clear a typing indicator previously shown with start_typing. Delivering a message or reaction...
name: str = 'stop_typing'
class dial_langchain.tools.TypingInput

Bases: pydantic.BaseModel

channel: str | None
from_number: str
to_number: str
class dial_langchain.tools.WaitForMessageInput

Bases: pydantic.BaseModel

phone_number_id: str
timeout_seconds: int
class dial_langchain.tools.WaitForMessageTool

Bases: _DialTool

Base for Dial LangChain tools.

Holds a shared DialClient (passed in, not constructed per call) so every tool reuses one connection pool. These tools are async-only: LangChain/LangGraph agents invoke them via _arun in their event loop, so the shared client is safe. arbitrary_types_allowed lets the Pydantic-based BaseTool carry the non-Pydantic DialClient as a field.

args_schema: type[pydantic.BaseModel]
description: str = 'Wait for the next inbound SMS or WhatsApp message and return it. Blocks until a message arrives...
name: str = 'wait_for_message'