How it works

Tools, tool calls, chord charts, the reference search, and the MCP server behind Jaizz Chat.

The short version

Jaizz Chat is a chat app backed by a free open-weight model (gpt-oss-120b on Groq, with OpenRouter's free models as a fallback). On its own, the model will confidently make up who played on a record, misspell a chord, or write a chart from a half-remembered lead sheet. So it is given tools: small functions that fetch real data or do exact work in code.

The model answers well-known things directly and looks up anything it isn't sure of. Most of the tools are also published as an MCP server, so any MCP client (Claude, an IDE, the MCP Inspector) can use them without this website.

What happens when you ask a question

  1. Browser → Worker Your question, plus the conversation so far, goes to a Cloudflare Worker. The API keys live there as secrets and never reach your browser.
  2. Worker ↔ MCP server The Worker acts as an MCP host. It runs initialize, then tools/list, to learn which tools exist and what arguments they take.
  3. Worker → model It sends the model your conversation and the tool definitions (names, descriptions, JSON Schemas). The model never sees the tool code.
  4. Model → Worker The model either answers directly, or replies with a tool call such as album_lineup({"album": "Kind of Blue", "artist": "Miles Davis"}). It cannot run anything itself.
  5. Worker → tool → model The Worker checks the arguments, runs the tool via MCP tools/call, and sends the result back to the model. Steps 4–5 repeat (at most 4 rounds) until the model answers in plain text. Limits are kept in code, not left to the model: at most 2 web searches and 2 reference searches per question.
  6. Worker → browser Before the answer goes out, code strips any "(Source: …)" or "(per Wikipedia)" tags and "According to Wikipedia, …" phrases the model added, because the page already shows what ran. You get the answer plus a trace of every tool call: expand "Used N tools" under any answer to see the exact arguments and raw results. A chord chart, if there is one, comes straight from the tool to the page.

The tools

Loading the tool list from the MCP server…

search_theory_books · Search the reference material

Searches scoped reference material (harmony, chord-scale theory, improvisation, voicings, arranging, jazz history, and how players learn and practice) and returns up to three relevant passages for the model to explain in its own words.

read-only · local data only · used by the chat only, not listed on the public MCP server

When the model calls which tool

The model picks a tool by reading its description, so the descriptions are written as instructions. In practice:

If a tool finds nothing, the model is instructed to say so instead of filling the gap from memory. Ask about an obscure record and you'll usually hear that the personnel isn't listed, rather than invented names. The chat also stays on jazz: questions about gear, repairs, health, legal or money matters get a one-line "that's outside what I cover".

Chord charts

Charts come from a library of over 2,000 tunes. They are drawn as charts, with sections, repeats and first and second endings.

Chord notes, spelled in code

Language models get accidentals and intervals wrong surprisingly often. So every note name the chat gives you for a chord comes from chord_voicings, a small piece of code that reads chord symbols the way a musician does:

Reference search

For theory and practice questions, the chat searches scoped reference material covering harmony, chord-scale theory, improvisation, voicings, arranging and jazz history. This is retrieval-augmented generation (RAG):

  1. The reference material was split into short passages ahead of time, and each passage was turned into a list of numbers (an embedding) that captures its meaning.
  2. Your question gets the same treatment, and the 30 passages closest in meaning come back from a vector database.
  3. A second model (a reranker) scores how well each passage actually answers your question. Being close in meaning isn't the same as being relevant, so passages below a fixed score are dropped.
  4. The best three go to the chat model, which explains them in its own words. If none pass, it says it didn't find anything rather than improvising.

Answers explain the material in the chat's own words, and the search isn't offered on the public MCP server.

Honest limits