Skip to main content
Glama

mcp-google-sheets

find-bot.ts1 kB
import { propsValidation } from '@activepieces/pieces-common'; import { createAction } from '@activepieces/pieces-framework'; import { docsbotAuth, docsbotCommon } from '../common'; export const findBot = createAction({ auth: docsbotAuth, name: 'findBot', displayName: 'Find Bot', description: 'Finds bot by name.', props: docsbotCommon.findBotProperties(), async run({ auth: apiKey, propsValue }) { await propsValidation.validateZod(propsValue, docsbotCommon.findBotSchema); const { teamId, name } = propsValue; const teamBots = await docsbotCommon.listBots({ apiKey, teamId, }); const needle = (name ?? '').trim().toLowerCase(); // Try to find case-insensitive and partial match const bot = teamBots.filter((bot) => (bot.name ?? '').toLowerCase().includes(needle) ); if (bot.length === 0) { throw new Error( `No bot found with a name containing "${name}" in the selected team.` ); } return bot; }, });

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/activepieces/activepieces'

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