in pkg/tools/kubectl_tool.go [40:70]
func (t *Kubectl) FunctionDefinition() *gollm.FunctionDefinition {
return &gollm.FunctionDefinition{
Name: t.Name(),
Description: t.Description(),
Parameters: &gollm.Schema{
Type: gollm.TypeObject,
Properties: map[string]*gollm.Schema{
"command": {
Type: gollm.TypeString,
Description: `The complete kubectl command to execute. Prefer to use heredoc syntax for multi-line commands. Please include the kubectl prefix as well.
Example:
user: what pods are running in the cluster?
assistant: kubectl get pods
user: what is the status of the pod my-pod?
assistant: kubectl get pod my-pod -o jsonpath='{.status.phase}'
`,
},
"modifies_resource": {
Type: gollm.TypeString,
Description: `Whether the command modifies a kubernetes resource.
Possible values:
- "yes" if the command modifies a resource
- "no" if the command does not modify a resource
- "unknown" if the command's effect on the resource is unknown
`,
},
},
},
}
}