Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export const SERVER_VERSION = '1.0.0';
export const USER_AGENT_ORIGIN = 'Origin/mcp-server';

export enum HelperTools {
SEARCH_ACTOR = 'search-actor',
ADD_TOOL = 'add-tool',
REMOVE_TOOL = 'remove-tool',
GET_TOOL_DETAILS = 'get-tool-details',
SEARCH_ACTORS = 'search-actors',
ADD_ACTOR = 'add-actor',
REMOVE_ACTOR = 'remove-actor',
GET_ACTOR_DETAILS = 'get-actor-details',
}

export const defaults = {
Expand Down
5 changes: 3 additions & 2 deletions src/tools/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ const GetActorDefinitionArgsSchema = z.object({
export const actorDefinitionTool: ToolWrap = {
type: 'internal',
tool: {
name: HelperTools.GET_TOOL_DETAILS,
actorFullName: HelperTools.GET_TOOL_DETAILS,
name: HelperTools.GET_ACTOR_DETAILS,
// TODO: remove actorFullName from internal tools
actorFullName: HelperTools.GET_ACTOR_DETAILS,
description: 'Get documentation, readme, input schema and other details about an Actor. '
+ 'For example, when user says, I need to know more about web crawler Actor.'
+ 'Get details for an Actor with with Actor ID or Actor full name, i.e. username/name.'
Expand Down
4 changes: 2 additions & 2 deletions src/tools/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const AddToolArgsSchema = z.object({
export const addTool: ToolWrap = {
type: 'internal',
tool: {
name: HelperTools.ADD_TOOL,
name: HelperTools.ADD_ACTOR,
description: 'Add a tool, Actor or MCP-Server to available tools by Actor ID or Actor name. '
+ 'A tool is an Actor or MCP-Server that can be called by the user'
+ 'Do not execute the tool, only add it and list it in available tools. '
Expand Down Expand Up @@ -48,7 +48,7 @@ export const RemoveToolArgsSchema = z.object({
export const removeTool: ToolWrap = {
type: 'internal',
tool: {
name: HelperTools.REMOVE_TOOL,
name: HelperTools.REMOVE_ACTOR,
description: 'Remove a tool, an Actor or MCP-Server by name from available tools. '
+ 'For example, when user says, I do not need a tool username/name anymore',
inputSchema: zodToJsonSchema(RemoveToolArgsSchema),
Expand Down
4 changes: 2 additions & 2 deletions src/tools/store_collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export const SearchToolArgsSchema = z.object({
export const searchActorTool: ToolWrap = {
type: 'internal',
tool: {
name: HelperTools.SEARCH_ACTOR,
actorFullName: HelperTools.SEARCH_ACTOR,
name: HelperTools.SEARCH_ACTORS,
actorFullName: HelperTools.SEARCH_ACTORS,
description: `Discover available Actors or MCP-Servers in Apify Store using full text search using keywords.`
+ `Users try to discover Actors using free form query in this case search query must be converted to full text search. `
+ `Returns a list of Actors with name, description, run statistics, pricing, starts, and URL. `
Expand Down
8 changes: 4 additions & 4 deletions tests/actor-server-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ describe('ApifyMcpServer initialization', () => {

const toolNames = server.getToolNames();
expect(toolNames).toEqual([
HelperTools.SEARCH_ACTOR,
HelperTools.GET_TOOL_DETAILS,
HelperTools.ADD_TOOL,
HelperTools.REMOVE_TOOL,
HelperTools.SEARCH_ACTORS,
HelperTools.GET_ACTOR_DETAILS,
HelperTools.ADD_ACTOR,
HelperTools.REMOVE_ACTOR,
]);
});
});