@@ -5,13 +5,12 @@ import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/
55import { expect } from 'vitest' ;
66
77import { HelperTools } from '../src/const.js' ;
8- import type { FeatureToolKey } from '../src/types.js' ;
8+ import type { ToolCategory } from '../src/types.js' ;
99
1010export interface McpClientOptions {
1111 actors ?: string [ ] ;
1212 enableAddingActors ?: boolean ;
13- enableBeta ?: boolean ; // Optional, used for beta features
14- tools ?: FeatureToolKey [ ] ; // Optional, used for feature tools
13+ tools ?: ToolCategory [ ] ; // Tool categories to include
1514}
1615
1716export async function createMcpSseClient (
@@ -22,16 +21,13 @@ export async function createMcpSseClient(
2221 throw new Error ( 'APIFY_TOKEN environment variable is not set.' ) ;
2322 }
2423 const url = new URL ( serverUrl ) ;
25- const { actors, enableAddingActors, enableBeta , tools } = options || { } ;
24+ const { actors, enableAddingActors, tools } = options || { } ;
2625 if ( actors ) {
2726 url . searchParams . append ( 'actors' , actors . join ( ',' ) ) ;
2827 }
2928 if ( enableAddingActors !== undefined ) {
3029 url . searchParams . append ( 'enableAddingActors' , enableAddingActors . toString ( ) ) ;
3130 }
32- if ( enableBeta !== undefined ) {
33- url . searchParams . append ( 'beta' , enableBeta . toString ( ) ) ;
34- }
3531 if ( tools && tools . length > 0 ) {
3632 url . searchParams . append ( 'tools' , tools . join ( ',' ) ) ;
3733 }
@@ -64,16 +60,13 @@ export async function createMcpStreamableClient(
6460 throw new Error ( 'APIFY_TOKEN environment variable is not set.' ) ;
6561 }
6662 const url = new URL ( serverUrl ) ;
67- const { actors, enableAddingActors, enableBeta , tools } = options || { } ;
63+ const { actors, enableAddingActors, tools } = options || { } ;
6864 if ( actors ) {
6965 url . searchParams . append ( 'actors' , actors . join ( ',' ) ) ;
7066 }
7167 if ( enableAddingActors !== undefined ) {
7268 url . searchParams . append ( 'enableAddingActors' , enableAddingActors . toString ( ) ) ;
7369 }
74- if ( enableBeta !== undefined ) {
75- url . searchParams . append ( 'beta' , enableBeta . toString ( ) ) ;
76- }
7770 if ( tools && tools . length > 0 ) {
7871 url . searchParams . append ( 'tools' , tools . join ( ',' ) ) ;
7972 }
@@ -104,17 +97,14 @@ export async function createMcpStdioClient(
10497 if ( ! process . env . APIFY_TOKEN ) {
10598 throw new Error ( 'APIFY_TOKEN environment variable is not set.' ) ;
10699 }
107- const { actors, enableAddingActors, enableBeta , tools } = options || { } ;
100+ const { actors, enableAddingActors, tools } = options || { } ;
108101 const args = [ 'dist/stdio.js' ] ;
109102 if ( actors ) {
110103 args . push ( '--actors' , actors . join ( ',' ) ) ;
111104 }
112105 if ( enableAddingActors !== undefined ) {
113106 args . push ( '--enable-adding-actors' , enableAddingActors . toString ( ) ) ;
114107 }
115- if ( enableBeta !== undefined ) {
116- args . push ( '--beta' , enableBeta . toString ( ) ) ;
117- }
118108 if ( tools && tools . length > 0 ) {
119109 args . push ( '--tools' , tools . join ( ',' ) ) ;
120110 }
0 commit comments