For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
        • cleanup
        • defineTool
        • getAgent
        • getConfig
        • getDataMapTools
        • getGlobalData
        • getHints
        • getInstanceKey
        • getParameterSchema
        • getPromptSections
        • getSkillData
        • getSkillNamespace
        • getTools
        • hasAllEnvVars
        • hasAllPackages
        • isInitialized
        • markInitialized
        • setAgent
        • setup
        • updateSkillData
        • validateEnvVars
        • validatePackages
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Returns
  • Example
AgentsSkillBase

getDataMapTools

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

getGlobalData

Next
Built with

Return fully-built SWAIG function dicts for tools that this skill builds via DataMap or any other path that produces a complete SWAIG function object (rather than a SkillToolDefinition handled by the default tool pipeline).

When a skill is added to an agent, AgentBase.addSkill() iterates the result and registers each entry via registerSwaigFunction.

Default returns []. Skills that only use the declarative getTools() path do not need to override this method.

Returns

Record<string, unknown>[] — array of pre-built SWAIG function dicts.

Example

1import { SkillBase, DataMap } from '@signalwire/sdk';
2
3class LookupSkill extends SkillBase {
4 static override SKILL_NAME = 'lookup';
5 static override SKILL_DESCRIPTION = 'Server-side lookup via DataMap';
6
7 override getDataMapTools(): Record<string, unknown>[] {
8 const dm = new DataMap('do_lookup')
9 .description('Look up a value by id')
10 .parameter('id', 'string', 'Record id', { required: true })
11 .webhook('GET', 'https://api.example.com/lookup/${args.id}');
12 return [dm.toSwaigFunction()];
13 }
14}