Skip to content

Class: LMToolSpec

Provider-independent tool schema attached to an LMRequest.

URI: dspy:LMToolSpec

 classDiagram
    class LMToolSpec
    click LMToolSpec href "../LMToolSpec/"
      LMToolSpec : description

      LMToolSpec : metadata





        LMToolSpec --> "0..1" Any : metadata
        click Any href "../Any/"



      LMToolSpec : name

      LMToolSpec : parameters





        LMToolSpec --> "0..1" Any : parameters
        click Any href "../Any/"



      LMToolSpec : provider_data





        LMToolSpec --> "0..1" Any : provider_data
        click Any href "../Any/"



      LMToolSpec : spec_type

Slots

Name Cardinality and Range Description Inheritance
name 0..1
String
Short human-readable name direct
description 0..1
String
Free-form description direct
parameters 0..1
Any
JSON-schema parameter spec for a tool 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
spec_type 0..1
String
Schema kind direct

Usages

used by used in type used
LMRequest tool_specs range LMToolSpec

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:LMToolSpec
native dspy:LMToolSpec
close mcp:Tool

LinkML Source

Direct

name: LMToolSpec
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: Provider-independent tool schema attached to an ``LMRequest``.
in_subset:
- lm_contract
- tooling
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mcp:Tool
slots:
- name
- description
- parameters
- metadata
- provider_data
attributes:
  spec_type:
    name: spec_type
    description: Schema kind. Always ``function`` for the current API.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: string(function)
    domain_of:
    - LMToolSpec
    range: string
    equals_string: function

Induced

name: LMToolSpec
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: Provider-independent tool schema attached to an ``LMRequest``.
in_subset:
- lm_contract
- tooling
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mcp:Tool
attributes:
  spec_type:
    name: spec_type
    description: Schema kind. Always ``function`` for the current API.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: string(function)
    owner: LMToolSpec
    domain_of:
    - LMToolSpec
    range: string
    equals_string: function
  name:
    name: name
    description: Short human-readable name.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: rdfs:label
    owner: LMToolSpec
    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: LMToolSpec
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string
  parameters:
    name: parameters
    description: JSON-schema parameter spec for a tool.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: LMToolSpec
    domain_of:
    - LMToolSpec
    range: Any
  metadata:
    name: metadata
    description: Opaque key/value metadata passed alongside an object.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: LMToolSpec
    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: LMToolSpec
    domain_of:
    - ToolResult
    - LMToolCallPart
    - LMToolResultPart
    - LMToolSpec
    - LMOutput
    - LMResponse
    range: Any