Skip to content
API & MCP

Context for a task at the lowest cost

Every context token you hand a model costs money and distracts it. The cheapest way to give an agent what it needs from the Cerebro is a single call to POST /v1/context (or get_context over MCP), with a tight budget.

  • No language model. meemoo builds the context with search by meaning and by words plus the Cerebro’s connections. There is no model cost per call.
  • One read. Each call counts as one read of your daily quota, no matter how many items it returns.
  • Within budget. It never goes over maxTokens. meemoo estimates tokens as characters / 4.
  1. Describe the task in task, in concrete natural language: “Write to Juan about the pricing proposal”.
  2. Set a tight maxTokens. 600 to 1,200 is enough for almost everything; the minimum is 300 and the maximum 8,000.
  3. If you already know which items must be included, pass them in focus (up to 10 refs). They go first and with more text.
  4. Paste the markdown into the agent’s prompt.
  5. Only if something is missing, open that item with GET /v1/items/{ref} (get_item over MCP).
Ventana de terminal
curl -X POST https://meemoo.tech/api/v1/context \
-H "Authorization: Bearer $MEEMOO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"task": "Write to Juan about the pricing proposal",
"maxTokens": 800,
"focus": ["notebook:9e2b5d71-4a8c-4e3f-b6d0-2c7a1f5e8b93"]
}'

In this order, until the budget is full: what you asked for in focus; the items closest to the task; and the direct (connected) neighbors of the three closest. The first one and the focus items get more text; the rest, a summary. Finished tasks don’t come in as close matches. Each entry in items says why it was included (why: focus, match or neighbor).

  • Many searches instead of one context call. Five search calls cost five reads and fill the prompt with loose results. One context call costs one and comes already organized.
  • A big maxTokens “just in case”. More context isn’t always better. Start low and raise it only if the agent comes up short.
  • A vague task. “Help me” brings little. “Prepare Monday’s call with Juan about the Acme contract” brings what helps.