@@ -16,7 +16,7 @@ import { getActorMCPServerPath, getActorMCPServerURL } from '../mcp/actors.js';
1616import { connectMCPClient } from '../mcp/client.js' ;
1717import { getMCPServerTools } from '../mcp/proxy.js' ;
1818import { actorDefinitionPrunedCache } from '../state.js' ;
19- import type { ActorDefinitionStorage , ActorInfo , InternalTool , ToolEntry } from '../types.js' ;
19+ import type { ActorDefinitionStorage , ActorInfo , ToolEntry } from '../types.js' ;
2020import { getActorDefinitionStorageFieldNames } from '../utils/actor.js' ;
2121import { getValuesByDotKeys } from '../utils/generic.js' ;
2222import type { ProgressTracker } from '../utils/progress.js' ;
@@ -257,41 +257,6 @@ export async function getActorsAsTools(
257257 return [ ...normalTools , ...mcpServerTools ] ;
258258}
259259
260- const getActorArgs = z . object ( {
261- actorId : z . string ( )
262- . min ( 1 )
263- . describe ( 'Actor ID or a tilde-separated owner\'s username and Actor name.' ) ,
264- } ) ;
265-
266- /**
267- * https://docs.apify.com/api/v2/act-get
268- */
269- export const getActor : ToolEntry = {
270- type : 'internal' ,
271- tool : {
272- name : HelperTools . ACTOR_GET ,
273- actorFullName : HelperTools . ACTOR_GET ,
274- description : 'Gets an object that contains all the details about a specific Actor.'
275- + 'Actor basic information (ID, name, owner, description)'
276- + 'Statistics (number of runs, users, etc.)'
277- + 'Available versions, and configuration details'
278- + 'Use Actor ID or Actor full name, separated by tilde username~name.' ,
279- inputSchema : zodToJsonSchema ( getActorArgs ) ,
280- ajvValidate : ajv . compile ( zodToJsonSchema ( getActorArgs ) ) ,
281- call : async ( toolArgs ) => {
282- const { args, apifyToken } = toolArgs ;
283- const { actorId } = getActorArgs . parse ( args ) ;
284- const client = new ApifyClient ( { token : apifyToken } ) ;
285- // Get Actor - contains a lot of irrelevant information
286- const actor = await client . actor ( actorId ) . get ( ) ;
287- if ( ! actor ) {
288- return { content : [ { type : 'text' , text : `Actor '${ actorId } ' not found.` } ] } ;
289- }
290- return { content : [ { type : 'text' , text : JSON . stringify ( actor ) } ] } ;
291- } ,
292- } as InternalTool ,
293- } ;
294-
295260const callActorArgs = z . object ( {
296261 actor : z . string ( )
297262 . describe ( 'The name of the Actor to call. For example, "apify/instagram-scraper".' ) ,
0 commit comments