Skip to content

[BUG] create_resource and apply_manifest functions may have a misleading description #454

@EdmondDantes21

Description

@EdmondDantes21

📋 Prerequisites

  • I have searched the existing issues to avoid creating a duplicate
  • By submitting this issue, you agree to follow our Code of Conduct
  • I have tried to clear cache/cookies or used incognito mode (if ui-related)
  • I am using the latest version of the software
  • I can consistently reproduce this issue

🎯 Affected Service(s)

Multiple services / System-wide issue

🚦 Impact/Severity

No impact (Default)

🐛 Bug Description

It seems that the descriptions of the apply_manifest and create_resource in python/src/kagent/tools/k8s/_kubectl.py unintentionally mislead the agent:

  • apply_manifest description: "Create a resource in Kubernetes. Must be a local file." Based on the implementation, it looks like the file doesn't need to be local. In my tests this consistently confused the agent when asked to apply a resource.

  • create_resource description: "Apply a YAML resource file to the Kubernetes cluster." This seems to have a similar issue as apply_manifest

Changing these to "Apply a YAML resource to the Kubernetes cluster." and "Create a resource in Kubernetes." greatly improved the model's ability to use tools in my tests.

Please let me know if I am missing something.

🔄 Steps To Reproduce

  1. Create an agent using qwen3:30b-a3b through ollama with the ApplyManifest and/or CreateResource k8s tools.
  2. Ask the agent "show me an example of a nginx pod"
  3. Then ask "apply the nginx pod to my local kubernetes cluster"

🤔 Expected Behavior

The agent calls either the create_manifest or the ApplyManifest or CreateResource tools with the manifest provided earlier as argument.

📱 Actual Behavior

The agent calls the ApplyManifest or CreateResource tools using a non existent 'nginx-pod.yaml' string as the argument, possibly being misled by the tool's description.

💻 Environment

No response

🔧 CLI Bug Report

No response

🔍 Additional Context

No response

📋 Logs

📷 Screenshots

No response

🙋 Are you willing to contribute?

  • I am willing to submit a PR to fix this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions