Skip to content

Commit 18381c9

Browse files
review changes
1 parent 5d6dd50 commit 18381c9

2 files changed

Lines changed: 45 additions & 19 deletions

File tree

plugins/context-matic/.mcp.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"mcpServers": {
33
"context-matic": {
4-
"url": "https://chatbotapi.apimatic.io/mcp/plugins"
4+
"url": "https://chatbotapi.apimatic.io/mcp/plugins",
5+
"headers": {
6+
"X-Apimatic-Mcp-Client": "VsCode"
7+
}
58
}
69
}
710
}

skills/integrate-context-matic/SKILL.md

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,62 +17,85 @@ Apply this skill when the user:
1717

1818
## Workflow
1919

20-
### 1. Discover Available APIs
20+
### 1. Ensure Guidelines and Skills Exist
21+
22+
#### 1a. Detect the Project's Primary Language
23+
24+
Before checking for guidelines or skills, identify the project's primary programming language by inspecting the workspace:
25+
26+
| File / Pattern | Language |
27+
|---|---|
28+
| `*.csproj`, `*.sln` | `csharp` |
29+
| `package.json` with `"typescript"` dep or `.ts` files | `typescript` |
30+
| `requirements.txt`, `pyproject.toml`, `*.py` | `python` |
31+
| `go.mod`, `*.go` | `go` |
32+
| `pom.xml`, `build.gradle`, `*.java` | `java` |
33+
| `Gemfile`, `*.rb` | `ruby` |
34+
| `composer.json`, `*.php` | `php` |
35+
36+
Use the detected language in all subsequent steps wherever `language` is required.
37+
38+
#### 1b. Check for Existing Guidelines and Skills
39+
40+
Check whether guidelines and skills have already been added for this project by looking for their presence in the workspace. Check for existing skill and guideline files, e.g., `{language}-conventions`, `{language}-security-guidelines.md`, `{language}-test-guidelines.md`, `update-activity-workflow.md`, or prior output from `add_guidelines` and `add_skills`.
41+
42+
- **If they do not exist for the project's language:** Call **add_guidelines** and **add_skills** to create them. This sets up the necessary skills and guidelines for the MCP server to work correctly.
43+
- **If they already exist for the project's language:** Skip this step entirely and proceed to step 2.
44+
45+
### 2. Discover Available APIs
2146

2247
Call **fetch_api** to find available APIs — always start here.
2348

24-
- Provide the `language` parameter matching the project's primary language (e.g. `csharp`, `python`, `typescript`, `go`, `java`, `ruby`, `php`).
25-
- Infer the language from the codebase (e.g. `.csproj``csharp`, `package.json` with TypeScript → `typescript`).
49+
- Provide the `language` parameter using the language detected in step 1a.
2650
- The response returns available APIs with their names, descriptions, and `key` values.
2751
- Identify the API that matches the user's request based on the name and description.
2852
- Extract the correct `key` for the user's requested API before proceeding. This key will be used for all subsequent tool calls related to that API.
2953

3054
**If the requested API is not in the list:**
31-
- Inform the user that the API is not currently available in this plugin.
32-
- Continue integrating the required API without the plugin.
55+
- Inform the user that the API is not currently available in this plugin (context-matic) and stop.
56+
- Request guidance from user on how to proceed with the API's integration.
3357

34-
### 2. Get Integration Guidance
58+
### 3. Get Integration Guidance
3559

36-
Call **update_activity** (`phase='planning'`, `language`, `key`) immediately before calling **ask**.
60+
Call **update_activity** immediately before calling **ask**.
3761

38-
- Provide `ask` with: `language`, `key` (from step 1), and your `query`.
62+
- Provide `ask` with: `language`, `key` (from step 2), and your `query`.
3963
- Break complex questions into smaller focused queries for best results:
4064
- _"How do I authenticate?"_
4165
- _"How do I create a payment?"_
4266
- _"What are the rate limits?"_
43-
- Call **update_activity** with `phase='execution'` before generating or fixing code.
67+
- Call **update_activity** immediately before generating or fixing code.
4468

45-
### 3. Look Up SDK Models and Endpoints (as needed)
69+
### 4. Look Up SDK Models and Endpoints (as needed)
4670

4771
These tools return definitions only — they do not call APIs or generate code.
4872

49-
Call **update_activity** (`phase='planning'`, `language`, `key`) immediately before each call.
73+
Call **update_activity** immediately before each call.
5074

5175
- **model_search** — look up a model/object definition.
5276
- Provide: `language`, `key`, and an exact or partial case-sensitive model name as `query` (e.g. `availableBalance`, `TransactionId`).
53-
5477
- **endpoint_search** — look up an endpoint method's details.
5578
- Provide: `language`, `key`, and an exact or partial case-sensitive method name as `query` (e.g. `createUser`, `get_account_balance`).
5679

57-
### 4. Record Milestones
80+
### 5. Record Milestones
5881

5982
Call **update_activity** (with the appropriate `milestone`) whenever one of these is observed or confirmed:
6083

6184
| Milestone | When to pass it |
6285
|---|---|
6386
| `sdk_setup` | SDK packages installed and environment confirmed set up |
6487
| `auth_configured` | API keys or auth configured, ready to make first call |
65-
| `first_call_attempted` | First API call code written and executed |
66-
| `first_call_succeeded` | Successful response from first API call received |
88+
| `first_call_made` | First API call code written and executed |
6789
| `error_encountered` | Developer reports a bug, error response, or failing call |
6890
| `error_resolved` | Fix applied and API call confirmed working |
69-
| `tests_passing` | Integration tests written and confirmed passing |
7091

7192
## Checklist
7293

94+
- [ ] Project's primary language detected (step 1a)
95+
- [ ] `add_guidelines` and `add_skills` called (or confirmed already present — then skipped)
7396
- [ ] `fetch_api` called with correct `language` for the project
7497
- [ ] Correct `key` identified for the requested API (or user informed if not found)
75-
- [ ] `update_activity` called as first tool when integration begins
98+
- [ ] `update_activity` first called after `fetch_api` when integration work begins
7699
- [ ] `update_activity` called immediately before every `ask`, `model_search`, and `endpoint_search`
77100
- [ ] `update_activity` called with the appropriate `milestone` at each integration milestone
78101
- [ ] `ask` used for integration guidance and code samples
@@ -81,5 +104,5 @@ Call **update_activity** (with the appropriate `milestone`) whenever one of thes
81104

82105
## Notes
83106

84-
- **API not found**: If an API is missing from `fetch_api`, do not guess at SDK usage — inform the user and stop.
107+
- **API not found**: If an API is missing from `fetch_api`, do not guess at SDK usage — inform the user that the API is not currently available in this plugin and stop.
85108
- **update_activity and fetch_api**: `fetch_api` is API discovery, not integration — do not call `update_activity` before it.

0 commit comments

Comments
 (0)