AgentsSkillBase

get_parameter_schema

View as MarkdownOpen in Claude

Class method that returns metadata about all parameters the skill accepts. Subclasses should call super().get_parameter_schema() and merge their own parameters.

Returns

dict[str, dict[str, Any]] — Parameter schema where keys are parameter names and values describe the parameter.

Built-in parameters:

ParameterTypeDefaultDescription
swaig_fieldsobject{}Additional SWAIG metadata merged into tool definitions
skip_promptboolFalseSuppress default prompt section injection
tool_namestrSKILL_NAMECustom name for this instance (multi-instance skills only)

Schema value fields:

FieldTypeDescription
typestr"string", "integer", "number", "boolean", "object", "array"
descriptionstrHuman-readable description
defaultAnyDefault value
requiredboolWhether the parameter is required
hiddenboolHide in UIs (for secrets like API keys)
env_varstrEnvironment variable that can provide this value
enumlistAllowed values
min / maxnumberBounds for numeric types

Example

1from signalwire.core.skill_base import SkillBase
2
3class WeatherSkill(SkillBase):
4 SKILL_NAME = "weather"
5 SKILL_DESCRIPTION = "Provides weather information"
6
7 @classmethod
8 def get_parameter_schema(cls):
9 schema = super().get_parameter_schema()
10 schema.update({
11 "units": {
12 "type": "string",
13 "description": "Temperature units",
14 "default": "fahrenheit",
15 "enum": ["fahrenheit", "celsius"]
16 },
17 "api_key": {
18 "type": "string",
19 "description": "Weather API key",
20 "required": True,
21 "hidden": True,
22 "env_var": "WEATHER_API_KEY"
23 }
24 })
25 return schema
26
27 def setup(self) -> bool:
28 return True
29
30 def register_tools(self):
31 pass
32
33# Inspect the schema
34print(WeatherSkill.get_parameter_schema())
35# {'swaig_fields': {...}, 'skip_prompt': {...}, 'units': {...}, 'api_key': {...}}