Skip to content

Commit c2c46d2

Browse files
author
deec
committed
updates to README.md and connx_server.py including tests.
1 parent d8dd3f2 commit c2c46d2

File tree

2 files changed

+39
-25
lines changed

2 files changed

+39
-25
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,21 @@ Below are examples of how MCP-compatible clients (such as Claude Desktop or othe
219219
5. “Show me details for customer Z3375.”
220220
6. “Do we have any customers missing phone numbers?”
221221
7. "What products are most frequently ordered by customers?"
222+
223+
### What MCP tools are available?
224+
225+
CONNX Database Server Tools:
226+
227+
query_connx - Query data from CONNX-connected databases using SQL (SELECT-only queries)
228+
update_connx - Perform update operations (requires CONNX_ALLOW_WRITES=true)
229+
count_customers - Get total number of customers
230+
customers_by_state - Get customer distribution by state
231+
customer_cities - Get customer cities information
232+
customers_missing_phone - Find customers without phone numbers
233+
get_customer - Retrieve a specific customer by ID
234+
find_customers - Search for customers by state and optional city
235+
describe_entities - Describe known business entities and their data sources
236+
count_entities - Count rows for business entities (customers, clients, etc.)
222237
---
223238

224239
## Testing

connx_server.py

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,23 @@
3333

3434
ENTITY_ALIASES = {
3535
"customers": {
36-
"aliases": [
37-
"customer",
38-
"customers",
39-
"client",
40-
"clients",
41-
"accounts",
42-
"buyers",
43-
"companies"
44-
],
36+
"aliases": ["customer", "customers", "client", "clients", "accounts", "buyers", "companies"],
4537
"table": "daea_Mainframe_VSAM.dbo.CUSTOMERS_VSAM",
4638
"description": "VSAM-backed customer master file accessed via CONNX"
39+
},
40+
"orders": {
41+
"aliases": ["order", "orders", "purchases", "transactions", "sales"],
42+
"table": "daea_Mainframe_VSAM.dbo.ORDERS_VSAM",
43+
"description": "Customer order transactions stored in VSAM"
44+
},
45+
"products": {
46+
"aliases": ["product", "products", "items", "inventory", "goods"],
47+
"table": "daea_Mainframe_VSAM.dbo.PRODUCTS_VSAM",
48+
"description": "Product master file stored in VSAM"
4749
}
4850
}
4951

52+
5053
def resolve_entity(name: str) -> Optional[str]:
5154
"""
5255
Resolve a natural-language entity name to a canonical table.
@@ -493,39 +496,35 @@ async def get_semantic_entities() -> Dict[str, Any]:
493496
"entities": [
494497
{
495498
"entity": "customers",
496-
"aliases": [
497-
"customer", "customers", "client", "clients",
498-
"accounts", "buyers", "companies"
499-
],
499+
"aliases": ["customer", "customers", "client", "clients", "accounts", "buyers", "companies"],
500500
"table": "daea_Mainframe_VSAM.dbo.CUSTOMERS_VSAM",
501501
"primary_key": "CUSTOMERID",
502-
"description": "Customer master records stored in a VSAM file"
502+
"description": "Customer master records stored in a VSAM file",
503503
},
504504
{
505505
"entity": "orders",
506-
"aliases": [
507-
"order", "orders", "purchases", "transactions", "sales"
508-
],
506+
"aliases": ["order", "orders", "purchases", "transactions", "sales"],
509507
"table": "daea_Mainframe_VSAM.dbo.ORDERS_VSAM",
510508
"primary_key": "ORDERID",
511509
"foreign_keys": {
512510
"CUSTOMERID": "customers.CUSTOMERID",
513-
"PRODUCTID": "products.PRODUCTID"
511+
"PRODUCTID": "products.PRODUCTID",
512+
},
513+
"relationships": {
514+
"customers": "orders.CUSTOMERID -> customers.CUSTOMERID",
515+
"products": "orders.PRODUCTID -> products.PRODUCTID",
514516
},
515-
"description": "Customer order transactions stored in VSAM"
517+
"description": "Customer order transactions stored in VSAM",
516518
},
517519
{
518520
"entity": "products",
519-
"aliases": [
520-
"product", "products", "items", "inventory", "goods"
521-
],
521+
"aliases": ["product", "products", "items", "inventory", "goods"],
522522
"table": "daea_Mainframe_VSAM.dbo.PRODUCTS_VSAM",
523523
"primary_key": "PRODUCTID",
524-
"description": "Product master file stored in VSAM"
525-
}
524+
"description": "Product master file stored in VSAM",
525+
},
526526
]
527527
}
528-
529528
# Main Entry Point
530529
if __name__ == "__main__": # pragma: no cover
531530
# FastMCP.run() manages its own event loop via anyio.run()

0 commit comments

Comments
 (0)