Reference manual

MCP server

Prism for C/AL runs a Model Context Protocol (MCP) server. An AI agent connected to it searches your exported C/AL objects through Prism's symbol index: it finds objects and members, reads their code, follows references, calls and object dependencies, and checks that an edited object still parses. The server only reads your objects; it never changes them.

HTTP STDIO 11 tools · 7 resources AI agent VS Code Claude Code Other client MCP Server pagehttp://localhost:47821In the workspace window Open object storeFile, folder or mirror prism-cal.exemcp-server-stdio <path>Started by the agent Object text fileor folder at <path> HTTP STDIO 11 tools · 7 resources AI agent VS Code Claude Code Other client MCP Server pagehttp://localhost:47821In the workspace window Open object storeFile, folder or mirror prism-cal.exemcp-server-stdio <path>Started by the agent Object text file or folderAt <path>
The two ways an agent reaches Prism's MCP server, and what comes back.

An agent reaches the server in one of two ways:

TransportWho starts the serverPrism windowSymbol index
HTTPYou, from Prism for C/ALMCP Server page, kept openShared by every agent
stdioThe agent (Claude Code, GitHub Copilot)Not neededBuilt by each server the agent starts

Use HTTP while you work in Prism; use stdio when the agent works on its own.

Get started with an agent

Use this to try Prism with GitHub Copilot in Visual Studio Code or with Claude Code.

  1. Open a folder in your agent: the project you work on, or an empty folder such as C:\repos\nav-prism when you work from a mirror.
  2. In Prism for C/AL, open the object store, select MCP Server in the navigation rail, and select Start. The Status card shows Running. Keep the workspace window open while the agent works.
  3. Select Show mcp.json…, select your agent in Client, and leave HTTP (this window) selected. Select Copy whole file and save it in the folder from step 1 under the name after Paste into: .vscode/mcp.json for Visual Studio Code, .mcp.json for Claude Code.
  4. Start a new chat in that folder, in agent mode in Visual Studio Code. When the agent asks whether to trust the Prism server, allow it.
  5. Ask Which objects use codeunit Sales-Post?, or name an object of your own.

For more detailed instructions or a more complex setup, see the MCP Server page and mcp.json.

Tell your agent to use Prism

Use this when the agent searches the object text files instead of calling Prism. A text match misses usages through record variables, Rec and WITH blocks, and matches same-named fields and procedures of other objects; Prism's index does not.

  1. Save the skill below as prism-for-cal/SKILL.md in the agent's skills folder (see the table).
  2. Start a new session.
---
name: prism-for-cal
description: Use for any question about this repository's C/AL code (Dynamics NAV objects) — where a field, procedure or table is used or written, what a procedure calls, which objects depend on an object, whether an edited object still parses. Load this before searching text or reading the exported object files; text search gives wrong answers for C/AL.
---

# Prism for C/AL

This repository's C/AL objects are indexed by the **Prism for C/AL** MCP server, which resolves each reference to the declaration it binds to — through record variables, `Rec` and `WITH` blocks, where a text match misses usages and matches same-named fields and procedures of other objects.

If your client defers the server's tools, load them with one tool search, then start from `find_symbols` and pass the `prismPathUri` it returns to the other tools unchanged. After the objects are exported or edited again, call `reload_workspace` before you trust the answers.
AgentSkills folder
Claude Code .claude/skills/ in the repository, or ~/.claude/skills/ for every repository.
GitHub Copilot, Codex, Cursor and Zed .agents/skills/ in the repository, or ~/.agents/skills/ for every repository.

What you can ask

These prompts show what the index answers that a text search cannot, each with the tools the agent calls. Use names from your own objects.

  • Where is field Credit Limit (LCY) of table Customer written?

    1. find_symbols
    2. find_references

    Only the lines that assign the field, VALIDATE among them, grouped by object and trigger.

  • Which objects use codeunit Sales-Post?

    1. find_symbols
    2. find_object_dependencies

    The objects that depend on it, each with how: a variable, a parameter, a property or a call by name or number.

  • What does PostCustomerEntry in codeunit Sales-Post call, three levels down? Show me the code of anything that posts to the G/L.

    1. find_symbols
    2. find_callees
    3. get_source_code
  • How does page Sales Order end up depending on codeunit Gen. Jnl.-Post Line?

    1. find_symbols
    2. find_dependency_paths

    The routes between the two objects, shortest first, each hop with the kind of dependency.

  • I changed this object. Is it still valid C/AL before I import it?

    1. check_object_source

    A syntax check of the object text, with the line and column of the first error.

  • Which of our objects from 50000 to 99999 subscribe to events?

    1. find_symbols
Claude Code answering, through Prism, where field Credit Limit (LCY) of table Customer is written: once, in codeunit 6112 Customer Data Migration Facade
Claude Code with Prism connected, asked where Credit Limit (LCY) is written.
GitHub Copilot in Visual Studio Code answering, through Prism, which objects use codeunit Sales-Post: 44 codeunits, tables, pages and reports
GitHub Copilot in Visual Studio Code, asked which objects use Sales-Post.

The declarations an agent names are Prism Paths. Paste one into Universal Search to open the declaration in Prism and check the answer yourself.

An unhandled error has occurred. Reload 🗙