You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/tools.js
+13-29Lines changed: 13 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,22 @@ import { z } from 'zod'
5
5
importsetModelfrom'./setModel.js'
6
6
importfuzzyTopNfrom'./fuzzyTopN.js'
7
7
8
-
constPROJECT_PATH={
9
-
projectPath: z.string().describe('Root path of the project')
10
-
}
11
-
12
8
consttools={
13
9
search_cds_definitions: {
14
10
title: 'Search for CDS definitions',
15
11
description:
16
12
'Get details of CDS definitions, returns Core Schema Notation (CSN). Use this if you want to see elements, parameters, file locations, URL paths, etc., helpful when constructing queries or OData URLs or when modifying CDS models.',
17
13
inputSchema: {
18
-
...PROJECT_PATH,
19
-
name: z.string().optional().describe('Name of the definition (fuzzy search, no regex or special characters)'),
20
-
kind: z.string().optional().describe('Kind of the definition (service, entity, action, ...)'),
21
-
topN: z.number().default(1).describe('Number of results')
14
+
projectPath: z.string().describe('Root path of the project'),
15
+
name: z
16
+
.string()
17
+
.optional()
18
+
.describe('Name of the definition (fuzzy search (Levenshtein distance), no regex or special characters)'),
19
+
kind: z.string().optional().describe('Filter for kind of the definition (service, entity, action, ...)'),
20
+
topN: z.number().default(1).describe('Number of results'),
21
+
namesOnly: z.boolean().optional().describe('If true, only return the names of the definitions')
'Get an overview of available CDS definitions, for details use `search_cds_definitions`. Helpful for initial exploration, e.g. to get all service names.',
39
-
inputSchema: {
40
-
...PROJECT_PATH,
41
-
kind: z.string().optional().describe('Kind of the definition (service, entity, action, ...)')
0 commit comments