Skip to content

Commit 49436dd

Browse files
committed
added a tester profile, this will show the test prompts
1 parent dca53a9 commit 49436dd

File tree

8 files changed

+125
-79
lines changed

8 files changed

+125
-79
lines changed

docs/developer_guide/DEVELOPER_GUIDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,13 @@ Two guides have been created to show how to add tools and prompts:
125125
## Tools testing
126126
Every module will have at least one prompt that would be responsible for testing all of the tools in the module.
127127

128+
Use the tester profile to see the test prompts.
129+
130+
`uv run teradata-mcp-server --profile tester`
131+
128132
The following test prompt template should be modified and placed in the module_objects.ylm file (e.g. base_objects.yml), the name of the testig prompt should be test_\<module name\>Tools. (e.g. test_baseTools):
129133

134+
130135
```
131136
test_baseTools:
132137
type: prompt

profiles.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
all:
2+
tool:
3+
- .*
4+
prompt:
5+
- ^(?!test_).*
6+
resource:
7+
- .*
8+
9+
tester:
210
tool:
311
- .*
412
prompt:
@@ -8,20 +16,20 @@ all:
816

917
dba:
1018
tool:
11-
- dba_*
12-
- base_*
13-
- sec_*
19+
- ^dba_*
20+
- ^base_*
21+
- ^sec_*
1422
prompt:
15-
- dba_*
23+
- ^dba_*
1624

1725
dataScientist:
1826
tool:
19-
- base_*
20-
- rag_*
21-
- fs_*
22-
- qlty_*
23-
- sec_userDbPermissions
24-
- dba_userSqlList
27+
- ^base_*
28+
- ^rag_*
29+
- ^fs_*
30+
- ^qlty_*
31+
- ^sec_userDbPermissions
32+
- ^dba_userSqlList
2533

2634
eda:
2735
tool:

src/teradata_mcp_server/tools/base/base_objects.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,47 @@ test_baseTools:
2222
Perform the phases in order, and do not skip any phase.
2323
2424
## Phase 0 - Get a list of databases
25-
- Get a list of databases from the user. Use the base_databaseList function to get the list. The tool should return a list of databases in the Teradata system.
25+
- Get a list of databases from the user. Use the base_databaseList function to get the list. The tool should return a list of databases in the Teradata system, if no data is returned then fail this test.
2626
## Phase 1 - Get the list of tables in each database
27-
- For the DBC database, get the list of tables. Use the base_tableList function to get the list. The tool should return a list of tables in the DBC database.
27+
- For the DBC database, get the list of tables. Use the base_tableList function to get the list. The tool should return a list of tables in the DBC database, if no data is returned then fail this test.
2828
## Phase 2 - Create a test table in your default database
2929
- Create a customer table in your default database called test_customer, the table should have an Cust_id column. Use the base_writeQuery function to create the table. A test_customer table should be created.
3030
- Add 10 rows to the test_customer table. Use the base_writeQuery function to add the rows.
3131
## Phase 3 - Test the query tool
32-
- test the query tool by running a query on the test_customer table. Use the base_readQuery function to run the query. The query should return the 10 rows you added in the previous phase.
33-
- test the query tool by running a query on the test_customer table with a filter. Use the base_readQuery function to run the query. The query should return only the rows that match the filter. (example of a filter is Cust_id > 5)
32+
- test the query tool by running a query on the test_customer table. Use the base_readQuery function to run the query. The query should return the 10 rows you added in the previous phase, if no data is returned then fail this test.
33+
- test the query tool by running a query on the test_customer table with a filter. Use the base_readQuery function to run the query. The query should return only the rows that match the filter, if no data is returned then fail this test. (example of a filter is Cust_id > 5)
3434
## Phase 4 - Test the table DDL tool
35-
- Get the DDL of the test_customer table. Use the base_tableDDL function to get the DDL. The tool should return the DDL of the test_customer table.
35+
- Get the DDL of the test_customer table. Use the base_tableDDL function to get the DDL. The tool should return the DDL of the test_customer table, if no data is returned then fail this test.
3636
## Phase 5 - Test the column description tool
37-
- Get the column description of the test_customer table. Use the base_columnDescription function to get the columns description. The tool should return the column description of the test_customer table.
37+
- Get the column description of the test_customer table. Use the base_columnDescription function to get the columns description. The tool should return the column description of the test_customer table, if no data is returned then fail this test.
3838
## Phase 6 - Test the table preview tool
39-
- Get the preview of the test_customer table. Use the base_tablePreview function to get the preview. The tool should return the first 5 rows of the test_customer table and the column information.
39+
- Get the preview of the test_customer table. Use the base_tablePreview function to get the preview. The tool should return the first 5 rows of the test_customer table and the column information, if no data is returned then fail this test.
4040
## Phase 7 - Test the table affinity tool
41-
- Get the table affinity of the test_customer table. Use the base_tableAffinity function to get the affinity. The tool should return the table affinity of the test_customer table.
41+
- Get the table affinity of the test_customer table. Use the base_tableAffinity function to get the affinity. The tool should return the table affinity of the test_customer table, if no data is returned then fail this test.
4242
## Phase 8 - Test the table usage tool
43-
- Get the table usage of the test_customer table. Use the base_tableUsage function to get the usage. The tool should return the table usage of the test_customer table.
43+
- Get the table usage of the test_customer table. Use the base_tableUsage function to get the usage. The tool should return the table usage of the test_customer table, if no data is returned then fail this test.
4444
## Phase 9 - Clean up
4545
- Drop the test_customer table. Use the base_writeQuery function to drop the table. The tool should return a success message.
4646
## Communication guidelines:
4747
- Be concise but informative in your explanations
4848
- Clearly indicate which phase the process is currently in
4949
- summarize the success or any failure of the phase before moving to the next phase
50-
## Final output guidelines:
51-
- return in markdown results for all phases
52-
- Example:
53-
***Phase 0:*** list databases: Successful
54-
***Phase 1:*** list tables in DBC database: Successful
55-
***Phase 2:*** Create test_customer table: Failed
50+
## Final output guidelines:
51+
- return in markdown results for all phases as a table including the phase number, description, success or failure status, and a description of the outcome.
52+
- if a tool does not return any results, then fail that test and indicate it in the outcome.
53+
## Example output:
54+
- | Phase | Description | Status | Outcome |
55+
- |-------|-------------|--------|---------|
56+
- | 0 | Get a list of databases | Success | List of databases returned |
57+
- | 1 | Get the list of tables in DBC database | Success | List of tables returned |
58+
- | 2 | Create a test table in default database | Success | test_customer table created |
59+
- | 3 | Test the query tool on test_customer table | Success | 10 rows returned |
60+
- | 4 | Get the DDL of the test_customer table | Success | DDL returned |
61+
- | 5 | Get the column description of the test_customer table | Success | Column description returned |
62+
- | 6 | Get the preview of the test_customer table | Success | First 5 rows and column info returned |
63+
- | 7 | Get the table affinity of the test_customer table | Success | Table affinity returned |
64+
- | 8 | Get the table usage of the test_customer table | Success | Table usage returned |
65+
- | 9 | Drop the test_customer table | Success | Table dropped successfully |
5666
5767
5868
base_query:

src/teradata_mcp_server/tools/dba/dba_objects.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -135,40 +135,40 @@ test_dbaTools:
135135
- Add 10 rows to the test_customer table using the base_writeQuery tool.
136136
137137
## Phase 1 - Get a list of all the SQL executed by a user
138-
- Get a list of all the SQL executed by a user (e.g. demo_user) in the last 7 days using the dba_userSqlList tool. A list of all SQL statements should be returned
138+
- Get a list of all the SQL executed by a user (e.g. demo_user) in the last 7 days using the dba_userSqlList tool. A list of all SQL statements should be returned, if no data is returned then fail this test
139139
140140
## Phase 2 - Get a list of all the SQL executed against a table
141-
- Get a list of all the SQL executed against a table (e.g. test_customer) in the last 7 days using the dba_tableSqlList tool. A list of all SQL statements should be returned
141+
- Get a list of all the SQL executed against a table (e.g. test_customer) in the last 7 days using the dba_tableSqlList tool. A list of all SQL statements should be returned, if no data is returned then fail this test
142142
143143
## Phase 3 - get a list of the current perm table space for a tables
144-
- Get the current perm table space for a test_customer table using the dba_tableSpace tool. The current perm table space should be returned.
144+
- Get the current perm table space for a test_customer table using the dba_tableSpace tool. The current perm table space should be returned, if no data is returned then fail this test.
145145
146146
## Phase 4 - get a list of the current perm database space for a database
147-
- Get the current perm database space for a database (e.g. demo_user) using the dba_databaseSpace tool. The current perm database space should be returned.
147+
- Get the current perm database space for a database (e.g. demo_user) using the dba_databaseSpace tool. The current perm database space should be returned, if no data is returned then fail this test.
148148
149149
## Phase 5 - get a list of the current database version
150-
- Get the current database version using the dba_databaseVersion tool. The current database version should be returned.
150+
- Get the current database version using the dba_databaseVersion tool. The current database version should be returned, if no data is returned then fail this test.
151151
152152
## Phase 6 - get a list of the system usage summary metrics
153-
- Get the Teradata system usage summary metrics by weekday and hour for each workload type and query complexity bucket using the dba_resusageSummary tool. The system usage summary metrics should be returned
153+
- Get the Teradata system usage summary metrics by weekday and hour for each workload type and query complexity bucket using the dba_resusageSummary tool. The system usage summary metrics should be returned, if no data is returned then fail this test
154154
155155
## Phase 7 - get a list of the system usage for a user
156-
- Get the system usage for a user (e.g. demo_user) using the dba_resusageSummary tool. The system resusage for the user (e.g. demo_user) should be returned.
156+
- Get the system usage for a user (e.g. demo_user) using the dba_resusageSummary tool. The system resusage for the user (e.g. demo_user) should be returned, if no data is returned then fail this test.
157157
158158
## Phase 8 - get a list of the system flow control metrics
159-
- Get the Teradata system flow control metrics by day and hour using the dba_flowControl tool. The system flow control metrics should be returned.
159+
- Get the Teradata system flow control metrics by day and hour using the dba_flowControl tool. The system flow control metrics should be returned, if no data is returned then fail this test.
160160
161161
## Phase 9 - get a list of the user feature usage metrics
162-
- Get the user feature usage metrics using the dba_featureUsage tool. The user feature usage metrics should be returned.
162+
- Get the user feature usage metrics using the dba_featureUsage tool. The user feature usage metrics should be returned, if no data is returned then fail this test.
163163
164164
## Phase 10 - get a list of the user delay metrics
165-
- Get the Teradata user delay metrics using the dba_userDelay tool. The user delay metrics should be returned.
165+
- Get the Teradata user delay metrics using the dba_userDelay tool. The user delay metrics should be returned, if no data is returned then fail this test.
166166
167167
## Phase 11 - get a list of the table usage impact by a user
168-
- Get the usage of a table (e.g. test_customer) by a user (e.g. demo_user) using the dba_tableUsageImpact tool. The usage of the table by the user should be returned.
168+
- Get the usage of a table (e.g. test_customer) by a user (e.g. demo_user) using the dba_tableUsageImpact tool. The usage of the table by the user should be returned, if no data is returned then fail this test.
169169
170170
## Phase 12 - get a list of the session information for a user
171-
- Get the session information for a user (e.g. demo_user) using the dba_sessionInfo tool. The session information for the user should be returned.
171+
- Get the session information for a user (e.g. demo_user) using the dba_sessionInfo tool. The session information for the user should be returned, if no data is returned then fail this test.
172172
173173
## Phase 13 - Clean up
174174
- Drop the test_customer table. Use the base_writeQuery function to drop the table. The tool should return a success message.
@@ -177,11 +177,24 @@ test_dbaTools:
177177
- Clearly indicate which phase the process is currently in
178178
- summarize the success or any failure of the phase before moving to the next phase
179179
## Final output guidelines:
180-
- return in markdown results for all phases
181-
- Example:
182-
***Phase 0:*** list databases: Successful
183-
***Phase 1:*** list tables in DBC database: Successful
184-
***Phase 2:*** Create test_customer table: Failed
180+
- return in markdown results for all phases as a table including the phase number, description, success or failure status, and a description of the outcome.
181+
- if a tool does not return any results, then fail that test and indicate it in the outcome.
182+
## Example output:
183+
184+
| Phase | Description | Status | Outcome |
185+
|-------|-------------|--------|---------|
186+
| 1 | Get a list of all the SQL executed against a table (e.g. test_customer) in the last 7 days | Successful | |
187+
| 2 | Get the current perm table space for a test_customer table | Successful | |
188+
| 3 | Get the current perm database space for a database (e.g. demo_user) | Successful | |
189+
| 4 | Get the current database version | Successful | |
190+
| 5 | Get the Teradata system usage summary metrics | Successful | |
191+
| 6 | Get the system usage for a user (e.g. demo_user) | Successful | |
192+
| 7 | Get the Teradata system flow control metrics | Successful | |
193+
| 8 | Get the user feature usage metrics | Successful | |
194+
| 9 | Get the Teradata user delay metrics | Successful | |
195+
| 10 | Get the usage of a table (e.g. test_customer) by a user (e.g. demo_user) | Successful | |
196+
| 11 | Get the session information for a user (e.g. demo_user) | Successful | |
197+
| 12 | Drop the test_customer table | Successful | |
185198
186199
187200
dba_tableArchive:

src/teradata_mcp_server/tools/fs/fs_objects.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ test_fsTools:
1414
- Clearly indicate which phase the process is currently in
1515
- summarize the success or any failure of the phase before moving to the next phase
1616
## Final output guidelines:
17-
- return in markdown results for all phases
18-
- Example:
19-
***Phase 0:*** list databases: Successful
20-
***Phase 1:*** list tables in DBC database: Successful
21-
***Phase 2:*** Create test_customer table: Failed
17+
- return in markdown results for all phases as a table including the phase number, description, success or failure status, and a description of the outcome.
18+
- if a tool does not return any results, then fail that test and indicate it in the outcome.
19+
## Example output:
20+
- | Phase | Description | Status | Outcome |
21+
- |-------|-------------|--------|---------|
22+
- | 0 | Set up test environment | Success | Test environment set up successfully |

0 commit comments

Comments
 (0)