bms-session-plugin 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/bms-session/SKILL.md +17 -8
package/package.json
CHANGED
|
@@ -5,20 +5,29 @@ description: This skill should be used when the user asks to "query HOSxP databa
|
|
|
5
5
|
|
|
6
6
|
# BMS Session API — HOSxP Hospital Database Integration
|
|
7
7
|
|
|
8
|
+
## CRITICAL: Immediate Action Required
|
|
9
|
+
|
|
10
|
+
**DO NOT ask the user for a session ID or any other setup questions.** The MCP server is already connected and authenticated. Start using tools immediately.
|
|
11
|
+
|
|
12
|
+
**Use these MCP tools directly (do NOT use Bash to run `claude mcp` commands):**
|
|
13
|
+
|
|
14
|
+
1. Call `list_tables` with a pattern to discover relevant tables (e.g., `list_tables({ pattern: "patient*" })`)
|
|
15
|
+
2. Call `describe_table` to understand column structure before writing queries
|
|
16
|
+
3. Call `query` to execute SQL and return results
|
|
17
|
+
|
|
18
|
+
**Do NOT attempt to read the `bms://session-info` resource** — it may fail due to timing. Instead, call `query({ sql: "SELECT VERSION()" })` to verify the connection works, then proceed with the user's request.
|
|
19
|
+
|
|
20
|
+
**Database info to know:** The database is either MariaDB or PostgreSQL. Use `SHOW TABLES LIKE 'pattern%'` for MariaDB or `information_schema` queries for PostgreSQL. If unsure, try MariaDB syntax first — most HOSxP deployments use MariaDB.
|
|
21
|
+
|
|
8
22
|
## Purpose
|
|
9
23
|
|
|
10
24
|
Provide guidance for querying and building applications against HOSxP hospital databases using the BMS Session API. HOSxP is the most widely used hospital information system in Thailand.
|
|
11
25
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
If the `bms-session` MCP server is connected, use its tools directly:
|
|
26
|
+
## Using MCP Tools
|
|
15
27
|
|
|
16
|
-
|
|
17
|
-
2. Use `list_tables` with a pattern filter to discover relevant tables (e.g., `list_tables({ pattern: "patient*" })`)
|
|
18
|
-
3. Use `describe_table` to understand column structure before writing queries
|
|
19
|
-
4. Use `query` to execute SQL and return results
|
|
28
|
+
Always use `LIMIT` to avoid returning excessive rows. Always use the `pattern` parameter with `list_tables` — the database has thousands of tables.
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
When the user asks to "analyze the database", "show patient data", "query hospital data", or similar — start working immediately by calling the MCP tools. Do not ask unnecessary questions. Use list_tables and describe_table to discover the schema, then write and execute queries.
|
|
22
31
|
|
|
23
32
|
## When MCP Server Is Not Available
|
|
24
33
|
|