Files
cleveragents-core/examples/skills/inline-tool.yaml

38 lines
937 B
YAML

# Inline-tool skill example — self-contained tools defined inline
# Register: agents skill add --config inline-tool.yaml
name: local/text-processing
description: "Simple text transformation utilities"
inline_tools:
- name: word_count
description: "Count words in text"
source: custom
code: |
def run(input_data):
text = input_data.get("text", "")
return {"count": len(text.split())}
input_schema:
type: object
properties:
text:
type: string
description: "Text to count words in"
required: ["text"]
writes: false
- name: to_uppercase
description: "Convert text to uppercase"
source: custom
code: |
def run(input_data):
return {"result": input_data.get("text", "").upper()}
input_schema:
type: object
properties:
text:
type: string
required: ["text"]
writes: false