Skip to main content
Glama

mcp-google-sheets

props.ts1.39 kB
import { AuthenticationType, httpClient, HttpMethod } from "@activepieces/pieces-common"; import { Property } from "@activepieces/pieces-framework"; import { baseUrlv0 } from "./common"; export const agentIdDropdown =(displayName:string, desc:string)=> Property.Dropdown({ displayName, required: true, description: desc, refreshers: [], options: async ({ auth }) => { if (!auth) { return { disabled: true, placeholder: 'Please authenticate first', options: [], }; } const response = await httpClient.sendRequest<{ success: boolean; data: Array<{ _id: string; name: string; }>; }>({ url: `${baseUrlv0}/agent`, method: HttpMethod.GET, authentication: { type: AuthenticationType.BEARER_TOKEN, token: auth as string, }, }); if (response.body.success && response.body.data) { return { options: response.body.data.map((agent) => { return { label: agent.name, value: agent._id, }; }), }; } return { disabled: true, placeholder: 'No agents found', options: [], }; }, })

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