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

from signalwire.core.skill_base import SkillBase
class WeatherSkill(SkillBase):
SKILL_NAME = "weather"
SKILL_DESCRIPTION = "Provides weather information"
@classmethod
def get_parameter_schema(cls):
schema = super().get_parameter_schema()
schema.update({
"units": {
"type": "string",
"description": "Temperature units",
"default": "fahrenheit",
"enum": ["fahrenheit", "celsius"]
},
"api_key": {
"type": "string",
"description": "Weather API key",
"required": True,
"hidden": True,
"env_var": "WEATHER_API_KEY"
}
})
return schema
def setup(self) -> bool:
return True
def register_tools(self):
pass
# Inspect the schema
print(WeatherSkill.get_parameter_schema())
# {'swaig_fields': {...}, 'skip_prompt': {...}, 'units': {...}, 'api_key': {...}}