Skip to main content
Glama

actors-mcp-server

Official
by apify
MIT License
7,198
465
  • Apple
tools.actor.test.ts1.2 kB
import { describe, expect, it } from 'vitest'; import { actorNameToToolName } from '../../src/tools/utils.js'; describe('actors', () => { describe('actorNameToToolName', () => { it('should replace slashes and dots with dash notation', () => { expect(actorNameToToolName('apify/web-scraper')).toBe('apify-slash-web-scraper'); expect(actorNameToToolName('my.actor.name')).toBe('my-dot-actor-dot-name'); }); it('should handle empty strings', () => { expect(actorNameToToolName('')).toBe(''); }); it('should handle strings without slashes or dots', () => { expect(actorNameToToolName('actorname')).toBe('actorname'); }); it('should handle strings with multiple slashes and dots', () => { expect(actorNameToToolName('actor/name.with/multiple.parts')).toBe('actor-slash-name-dot-with-slash-multiple-dot-parts'); }); it('should handle tool names longer than 64 characters', () => { const longName = 'a'.repeat(70); const expected = 'a'.repeat(64); expect(actorNameToToolName(longName)).toBe(expected); }); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/apify/actors-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server