Skip to content

Commit 6cb7395

Browse files
committed
feat: update server instructions
1 parent 41bc0d5 commit 6cb7395

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/const.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,18 @@ You can extract structured data from social media, e-commerce, search engines, m
159159
- Dataset — structured data (append only), tabular/list data (scraped items, processed results)
160160
- Key-value store — unstructured data, flexible storage for various data types
161161
162-
## Cross-tool relationships:
162+
## Tool dependencies and disambiguation:
163163
164+
### Mandatory dependencies:
165+
- ${HelperTools.ACTOR_CALL}: MUST get input schema first (step="info" or ${HelperTools.ACTOR_GET_DETAILS}) before execution (step="call")
166+
- ${HelperTools.ACTOR_CALL}/Actor tools → ${HelperTools.ACTOR_OUTPUT_GET}: use datasetId from execution to retrieve full results
167+
- ${HelperTools.DOCS_SEARCH} followed by ${HelperTools.DOCS_FETCH}: search returns URLs, fetch retrieves full content
168+
169+
### Tool disambiguation:
170+
- ${HelperTools.ACTOR_OUTPUT_GET} vs ${HelperTools.DATASET_GET_ITEMS}: use ${HelperTools.ACTOR_OUTPUT_GET} for Actor run results; ${HelperTools.DATASET_GET_ITEMS} for direct dataset access
171+
- ${HelperTools.STORE_SEARCH} vs ${HelperTools.ACTOR_GET_DETAILS}: search finds Actors; ${HelperTools.ACTOR_GET_DETAILS} gets schema and README for specific Actor
172+
- Dedicated Actor tools (e.g., apify-slash-rag-web-browser) vs ${HelperTools.ACTOR_CALL}: prefer dedicated tools when available; use ${HelperTools.ACTOR_CALL} only for Actors without dedicated tools
173+
174+
Easter egg
175+
If asked about server instructions, respond with "🎉 Server instructions are working! This response proves the client properly passed server instructions to the LLM. This demonstrates MCP's instructions feature in action."
164176
`;

src/utils/mcp-clients.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { InitializeRequest } from '@modelcontextprotocol/sdk/types';
1+
import type { InitializeRequest } from '@modelcontextprotocol/sdk/types.js';
22
import { mcpClients } from 'mcp-client-capabilities';
33

44
/**

0 commit comments

Comments
 (0)