Skip to main content
Glama

agentek-eth

by NaniDAO
tool.ts738 B
import type { Tool } from "ai"; import { tool } from "ai"; import { z } from "zod"; import type { BaseTool, AgentekClient } from "@agentek/tools/client"; export interface ToolDefinition { name: string; description: string; parameters: z.ZodObject<any>; } export interface ToolResult { result: any; } export default function AgentekTool( agentekClient: AgentekClient, baseTool: BaseTool, ): Tool { return tool({ description: baseTool.description, parameters: baseTool.parameters, execute: async (args: z.infer<typeof baseTool.parameters>) => { return agentekClient.execute(baseTool.name, args).catch((e: Error) => { return e.message || "Could not process this function"; }); }, }); }

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/NaniDAO/agentek'

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