Skip to content

Commit 1c8b5e0

Browse files
committed
clarifications
1 parent 4cf8e43 commit 1c8b5e0

7 files changed

+16
-20
lines changed

docs/Integration-MCP.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
!!! pied-piper ":bulb: TL;DR - MCP: Enable Bus Users to use NL to create multi-step execution flows"
22

3-
MCP enables Business Users to use Natural Language to create multi-step execution flows across existing business-rule-enforced APIs. For example:
3+
MCP enables Business Users to use Natural Language to create multi-step execution flows across existing business-rule-enforced APIs. For example, a Business User might request:
44

5-
*find the overdue orders, and send an email offering a discount*.
5+
*Find the overdue orders, and send an email offering a discount*.
66

7-
This is a new request, composed from existing steps (find orders, send email).
7+
This is a new request, composed from existing services (find orders, send email).
88

99
MCP is an open protocol than enables:
1010

11-
1. **MCP Client Executors** to discover servers (tools) - their schema, etc.
11+
1. **MCP Client Executors** to discover servers (tools) - their schema, instructions, etc.
1212
2. MCP Client Executors to call LLMs to translate NL queries into multi-step execution flows called **Tool Context Blocks.**.
13-
3. The MCP Client Executors to execute the Tool Context Block steps, making calls on the **MCP Server Executors.**
13+
3. The MCP Client Executors to process the Tool Context Block steps, making calls on the **MCP Server Executors.**
1414

1515
* MCP Server Executors are commonly provided via **logic-enabled JSON:APIs.** (Note the logic is critical in maintaining integrity and security.)
1616

1717
In some cases, you may have a database, but neither the APIs nor the logic. GenAI-Logic API Logic Server can **mcp-ify existing databases** by:
1818

19-
4. Creating JSON:APIs for existing databases with a single CLI command
20-
5. Enabling you to [declare business logic](Logic.md), which can be used via the APIs in MCP executipn flows.
19+
1. Creating JSON:APIs for *existing databases* with a single CLI command
20+
2. Enabling you to [declare business logic](Logic.md), which can be used via the APIs in MCP execution flows.
2121

2222
 
2323

@@ -66,6 +66,7 @@ Create the **basic_demo** under the [Manager](Manager.md) as described in the Ma
6666
2. Run `als add-cust` to load mcp (and logic)
6767
3. Start the Server (f5)
6868
4. Run `python integration/mcp/mcp_client_executor.py`
69+
* You can use Run Config: **Run designated Python file**
6970

7071

7172
The [basic_demo](Sample-Basic-Demo.md){:target="_blank" rel="noopener"} project illustrates basic GenAI-Logic operation: creating projects from new or existing databases, adding logic and security, and customizing your project using your IDE and Python.
@@ -78,16 +79,10 @@ You will need an environment variable: `APILOGICSERVER_CHATGPT_APIKEY` ChatGPT A
7879
Here is a NL prompt using *basic_demo* coded into `mcp_client_executor`
7980

8081
```
81-
List the orders created more than 30 days ago, and send a discount offer email to the customer for each one.
82-
83-
Respond with a JSON array of tool context blocks using:
84-
- tool: 'json-api'
85-
- JSON:API-compliant filtering (e.g., filter[CreatedOn][lt])
86-
- Use {{ order.customer_id }} as a placeholder in the second step.
87-
- Include method, url, query_params or body, headers, expected_output.
82+
List the unshipped orders created before 2023-07-14, and send a discount email (subject: 'Discount Offer') to the customer for each one.
8883
```
8984

90-
%nbsp;
85+
 
9186

9287
### Sample Flow
9388

@@ -103,16 +98,17 @@ Here is the basic driver of the test program (see the Architecture diagram above
10398
Discovery uses a config file `integration/mcp/mcp_server_discovery.json` to discover 1 or more servers, and invoke their `.well-known` endpoint (see `api/api_discovery/mcp_discovery.py`) to obtain the schema.
10499
![1-discovery-from-als](images/integration/mcp/1-discovery-from-als.png)
105100

101+
 
106102
#### 2 - Tool Context from LLM
107103

108104
We call the LLM, providing the NL Query and the discovered schema returned above. Note the schema includes:
109105

110106
1. resources: the schema itself
111107
* You would typically edit this file to expose only desired data, and reduce the size of the prompt
112108
2. instructions on how to format `expected_response` (e.g., `query_params`)
113-
3. how to use the **Request Pattern** to send email, subject to logic (see Logic, below):
109+
3. and how to use the **Request Pattern** to send email, subject to logic (see Logic, below):
114110

115-
![2-tool-context-from-LLM](images/integration/mcp/2-tool-context-from-LLM.png) The LLM returns a Tool Context completion (response), with the steps to call the MCP Server Executor, which here is the logic-enabled API Logic Server JSON:API.
111+
![2-tool-context-from-LLM](images/integration/mcp/2-tool-context-from-LLM.png) The LLM returns a Tool Context completion (response), with the steps to call the MCP Server Executor, which here is the logic-enabled API Logic Server JSON:API:
116112
![2-tool-context-from-LLM](images/integration/mcp/2-tool-context-from-LLM-d.png)
117113
#### 3 - Invoke MCP Server
118114

@@ -131,9 +127,9 @@ As shown below, a common [logic pattern](Logic.md#rule-patterns){:target="_blank
131127

132128
 
133129

134-
## Appendix: Status - Work In Progress
130+
## Appendix: Status - End-to-End Illustration
135131

136-
This is an initial experiment, with significant ToDo's (security, etc). That said, it might be an excellent way to explore MCP.
132+
This is intended to be a vehicle for exploring MCP. It is not productized - we need to explore security, and perhaps integrating this into the Admin App.
137133

138134
We welcome participation in this exploration. Please contact us via [discord](https://discord.gg/HcGxbBsgRF).
139135

docs/Sample-Basic-Demo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Instant Microservices - with Logic and Security
33
notes: gold is proto (-- doc); alert for apostrophe
4-
version: 0.20 from docsite
4+
version: 0.21 from docsite
55
---
66

77
See how to build a complete database system -- in minutes instead of weeks or months:
Loading
Loading
Loading
Loading
61.4 KB
Loading

0 commit comments

Comments
 (0)