Class: ToolResult
A tool execution result returned to the model (dspy.ToolResult).
URI: dspy:ToolResult
classDiagram
class ToolResult
click ToolResult href "../ToolResult/"
NamedThing <|-- ToolResult
click NamedThing href "../NamedThing/"
ToolResult : call_id
ToolResult : content_parts
ToolResult --> "*" LMPart : content_parts
click LMPart href "../LMPart/"
ToolResult : description
ToolResult : id
ToolResult : is_error
ToolResult : metadata
ToolResult --> "0..1" Any : metadata
click Any href "../Any/"
ToolResult : name
ToolResult : provider_data
ToolResult --> "0..1" Any : provider_data
click Any href "../Any/"
Inheritance
- NamedThing
- ToolResult
Slots
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| call_id | 0..1 Identifier |
Provider-issued tool-call id | direct |
| is_error | 0..1 Boolean |
Whether a tool result represents an error | direct |
| metadata | 0..1 Any |
Opaque key/value metadata passed alongside an object | direct |
| provider_data | 0..1 Any |
Provider-specific raw payload preserved with a normalized object | direct |
| content_parts | * LMPart |
Heterogeneous content parts attached to the tool result | direct |
| id | 1 Identifier |
Stable opaque identifier for an instance | NamedThing |
| name | 0..1 String |
Short human-readable name | 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
- from schema: https://w3id.org/lmodel/dspy
Mappings
| Mapping Type | Mapped Value |
|---|---|
| self | dspy:ToolResult |
| native | dspy:ToolResult |
| related | uco_action:Action |
| close | mcp:CallToolResult |
LinkML Source
Direct
name: ToolResult
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 tool execution result returned to the model (``dspy.ToolResult``).
in_subset:
- tooling
- lm_contract
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mcp:CallToolResult
related_mappings:
- uco_action:Action
is_a: NamedThing
slots:
- call_id
- is_error
- metadata
- provider_data
attributes:
content_parts:
name: content_parts
description: Heterogeneous content parts attached to the tool result.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
domain_of:
- ToolResult
- LMToolResultPart
range: LMPart
multivalued: true
inlined: true
inlined_as_list: true
Induced
name: ToolResult
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 tool execution result returned to the model (``dspy.ToolResult``).
in_subset:
- tooling
- lm_contract
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mcp:CallToolResult
related_mappings:
- uco_action:Action
is_a: NamedThing
attributes:
content_parts:
name: content_parts
description: Heterogeneous content parts attached to the tool result.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: ToolResult
domain_of:
- ToolResult
- LMToolResultPart
range: LMPart
multivalued: true
inlined: true
inlined_as_list: true
call_id:
name: call_id
description: Provider-issued tool-call id.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: ToolResult
domain_of:
- ToolCall
- ToolResult
- LMToolCallPart
- LMToolResultPart
range: Identifier
is_error:
name: is_error
description: Whether a tool result represents an error.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
ifabsent: boolean(False)
owner: ToolResult
domain_of:
- ToolResult
- LMToolResultPart
range: boolean
metadata:
name: metadata
description: Opaque key/value metadata passed alongside an object.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: ToolResult
domain_of:
- ToolResult
- Citation
- LMPart
- LMMessage
- LMToolSpec
- LMRequest
- LMUsage
- LMOutput
- LMResponse
range: Any
provider_data:
name: provider_data
description: Provider-specific raw payload preserved with a normalized object.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: ToolResult
domain_of:
- ToolResult
- LMToolCallPart
- LMToolResultPart
- LMToolSpec
- LMOutput
- LMResponse
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: ToolResult
domain_of:
- NamedThing
range: Identifier
required: true
name:
name: name
description: Short human-readable name.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
slot_uri: rdfs:label
owner: ToolResult
domain_of:
- NamedThing
- LMToolCallPart
- LMMessage
- LMToolSpec
range: string
description:
name: description
description: Free-form description.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
slot_uri: dct:description
owner: ToolResult
domain_of:
- NamedThing
- LMToolSpec
range: string