Skip to main content
Glama

Headline Vibes Analysis MCP Server

by fred-em
tokenBudget.test.ts757 B
import { describe, expect, it } from 'vitest'; import { estimateTokensForArticleSearch, checkAndRecord, recordActual, } from '../src/services/tokenBudget.js'; describe('token budget estimation', () => { it('charges one token per recent page', () => { const todayIso = new Date().toISOString().slice(0, 10); const estimate = estimateTokensForArticleSearch({ startDate: todayIso, endDate: todayIso, pagesPlanned: 3, }); expect(estimate).toBe(3); }); it('blocks when exceeding monthly hard cap without overage', () => { const status = checkAndRecord(100_000, { allowOverage: false }); expect(status.allowed).toBe(false); expect(status.status).toBe('blocked'); recordActual(0, 100_000); }); });

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/fred-em/headline-vibes'

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