Skip to main content
Glama
tools.output_error.spec.ts926 B
import { describe, it, expect } from 'vitest'; import { createTools } from '../src/tools/index.js'; import { AppError } from '../src/lib/errors.js'; class BadGL { listProjects = async () => [{ nope: true } as any]; listMergeRequests = async () => [{ nope: true } as any]; listIssues = async () => [{ nope: true } as any]; } class BadJira { searchIssues = async () => ({ issues: 'not-array' } as any); getIssue = async () => ({ notKey: true } as any); } describe('tools output shape errors', () => { const tools = createTools({ cfg: {}, gitlab: new BadGL() as any, jira: new BadJira() as any }); it('wraps Zod error for gitlab_list_projects', async () => { await expect(tools.gitlab_list_projects()).rejects.toBeInstanceOf(AppError); }); it('wraps Zod error for jira_search_issues', async () => { await expect(tools.jira_search_issues('project=TEST')).rejects.toBeInstanceOf(AppError); }); });

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/ashabbir/multi-mcp'

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