Skip to content

Class: ToolCall

A model request to invoke a tool (dspy.ToolCall, alias of LMToolCallPart).

URI: dspy:ToolCall

 classDiagram
    class ToolCall
    click ToolCall href "../ToolCall/"
      NamedThing <|-- ToolCall
        click NamedThing href "../NamedThing/"

      ToolCall : args





        ToolCall --> "0..1" Any : args
        click Any href "../Any/"



      ToolCall : call_id

      ToolCall : description

      ToolCall : id

      ToolCall : name

Inheritance

Slots

Name Cardinality and Range Description Inheritance
call_id 0..1
Identifier
Provider-issued tool-call id direct
args 0..1
Any
JSON-schema dict describing tool argument shapes direct
id 1
Identifier
Stable opaque identifier for an instance NamedThing
name 1
String
Name of the tool being invoked NamedThing
description 0..1
String
Free-form description NamedThing

In Subsets

Identifier and Mapping Information

Annotations

property value
dspy_source_paths ['dspy/core/types.py']
dspy_source_urls ['https://github.com/stanfordnlp/dspy/blob/main/dspy/core/types.py']

Schema Source

Mappings

Mapping Type Mapped Value
self dspy:ToolCall
native dspy:ToolCall
broad mellea:MethodSpec
close nexus:Action, mcp:CallToolRequest, uco_action:Action

LinkML Source

Direct

name: ToolCall
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/core/types.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/core/types.py
description: A model request to invoke a tool (``dspy.ToolCall``, alias of ``LMToolCallPart``).
in_subset:
- tooling
- lm_contract
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- nexus:Action
- mcp:CallToolRequest
- uco_action:Action
broad_mappings:
- mellea:MethodSpec
is_a: NamedThing
slots:
- call_id
- args
slot_usage:
  name:
    name: name
    description: Name of the tool being invoked.
    required: true

Induced

name: ToolCall
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/core/types.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/core/types.py
description: A model request to invoke a tool (``dspy.ToolCall``, alias of ``LMToolCallPart``).
in_subset:
- tooling
- lm_contract
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- nexus:Action
- mcp:CallToolRequest
- uco_action:Action
broad_mappings:
- mellea:MethodSpec
is_a: NamedThing
slot_usage:
  name:
    name: name
    description: Name of the tool being invoked.
    required: true
attributes:
  call_id:
    name: call_id
    description: Provider-issued tool-call id.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: ToolCall
    domain_of:
    - ToolCall
    - ToolResult
    - LMToolCallPart
    - LMToolResultPart
    range: Identifier
  args:
    name: args
    description: JSON-schema dict describing tool argument shapes.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: ToolCall
    domain_of:
    - Tool
    - ToolCall
    - LMToolCallPart
    range: Any
  id:
    name: id
    description: Stable opaque identifier for an instance.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: schema:identifier
    identifier: true
    owner: ToolCall
    domain_of:
    - NamedThing
    range: Identifier
    required: true
  name:
    name: name
    description: Name of the tool being invoked.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: rdfs:label
    owner: ToolCall
    domain_of:
    - NamedThing
    - LMToolCallPart
    - LMMessage
    - LMToolSpec
    range: string
    required: true
  description:
    name: description
    description: Free-form description.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: dct:description
    owner: ToolCall
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string