Skip to content

feat: skip describe tool when only actions exposed and per_action_tool - #73

Open
stefanrudi wants to merge 3 commits into
mainfrom
feat/skip-describe
Open

feat: skip describe tool when only actions exposed and per_action_tool#73
stefanrudi wants to merge 3 commits into
mainfrom
feat/skip-describe

Conversation

@stefanrudi

Copy link
Copy Markdown
Contributor

We should skip the describe tool when only actions / functions are exposed in the service and the per_action_tool feature flag is set.

@stefanrudi
stefanrudi requested review from a team as code owners August 28, 2026 13:14
@stefanrudi stefanrudi changed the title test: add test to skip describe when per_action_tool and only actions feat: skip describe tool when only actions exposed and per_action_tool Aug 28, 2026
@hyperspace-pr-bot

Copy link
Copy Markdown

Summary

The following content is AI-generated and provides a summary of the pull request:


test: Skip describe tool when per_action_tool is enabled and service exposes only actions

Description

This change ensures that the describe tool is skipped when the per_action_tool feature flag is set and the service exposes only actions/functions (no entities). Previously, the describe tool was always registered regardless of whether entities were present, which was unnecessary overhead when only action-specific tools are used.

Changes

  • lib/index.js: Added a condition to skip registerDescribeTool when per_action_tool is enabled and no entities are exposed. Also refactored the usePerActionTools check to use a strict boolean comparison (=== true).
  • lib/compile.js: Added the same conditional logic to skip adding the describe tool definition during compilation when per-action tools are used and no entities exist.
  • tests/bookshop/srv/action-only-service.cds: Added a new CDS service definition (ActionOnlyService) that exposes only an action (myAction) with no entities, used for testing.
  • tests/integration/per-action-tools.test.js: Added a test case verifying that the describe, query, and call tools are not listed, while myAction is listed, for the action-only service endpoint.
  • CHANGELOG.md: Added a changelog entry for version 1.4.4 documenting this behavior change.

Category

🧪 Test / 🐛 Bug Fix

Have you...

  • Added relevant entry to the change log?

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.29.54

  • Correlation ID: 5ea9c910-a2e2-11f1-9f05-fa435d5cdc12
  • File Content Strategy: Full file content
  • LLM: anthropic--claude-4.6-sonnet
  • Summary Prompt: Default Prompt
  • Output Template: Repository PR Template
  • Event Trigger: pull_request.opened

@stefanrudi stefanrudi changed the title feat: skip describe tool when only actions exposed and per_action_tool feat: skip describe tool when only actions exposed and per_action_tool is set Aug 28, 2026
@stefanrudi stefanrudi changed the title feat: skip describe tool when only actions exposed and per_action_tool is set feat: skip describe tool when only actions exposed and per_action_tool Aug 28, 2026
@stefanrudi
stefanrudi enabled auto-merge August 28, 2026 13:50

@PDT42 PDT42 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants