Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

- Skip `describe` tool when `per_action_tool` is enabled and the service exposes only actions/functions (no entities)

### Fixed

- Consider the prefix in the `query` tool description

## Version 1.4.3 - 2026-08-14

### Fixed
Expand Down
6 changes: 2 additions & 4 deletions lib/tools/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function createGenericReadToolDefinition(entityNames, serviceName, prefix = '')
if (cds.env.mcp?.format === 'cqn') {
return {
name,
description: `Query any entity in ${serviceName} service. Use describe to discover available entities and their fields.`,
description: `Query any entity in ${serviceName} service. Use ${prefix}describe to discover available entities and their fields.`,
inputSchema: createReadInputSchema({ entityNames }),
annotations: {
readOnlyHint: true,
Expand All @@ -64,9 +64,7 @@ function createGenericReadToolDefinition(entityNames, serviceName, prefix = '')

return {
name,
description:
`Query any entity in ${serviceName} service.` +
"Ensure to first use the `describe` tool to discover an entity's available fields.",
description: `Query any entity in ${serviceName} service. Ensure to first use the ${prefix}describe tool to discover an entity's available fields.`,
inputSchema: z.object({
cql: z
.string()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"tools": [
{
"name": "query",
"description": "Query any entity in CatalogService service.Ensure to first use the `describe` tool to discover an entity's available fields.",
"description": "Query any entity in CatalogService service. Ensure to first use the describe tool to discover an entity's available fields.",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
Expand Down
7 changes: 7 additions & 0 deletions tests/integration/prefix.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ describe('Tool Name Prefix (global prefix: true)', () => {
expect(content.data.length).to.be.greaterThan(0)
})

it('query tool description considers prefix for describe', async () => {
const response = await mcp('tools/list')
const queryTool = response.result.tools.find((t) => t.name === 'CatalogService-query')
expect(queryTool).to.exist
expect(queryTool.description).to.include('CatalogService-describe')
})

it('prefixed call tool works', async () => {
const { content, error } = await callTool('CatalogService-call', {
action: 'sum',
Expand Down