Skip to main content
Glama
glachana

bc-source-mcp

by glachana

Full-text search in BC AL source code

bc_search_code
Read-onlyIdempotent

Search AL source code in a branch using regular expressions. Filter results by object type or app folder to narrow down matches.

Instructions

Searches AL source code in a branch using regular expressions (ripgrep). Returns matching lines with optional context. Filter by object_type (file suffix, e.g. "table" → "*.Table.al") or by app (top-level folder). Triggers indexing on first use of a branch (for the worktree).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYesBranch name, e.g. "w1-26"
patternYesRegular expression to search for
object_typeNoLimit to a specific AL object type (table, page, codeunit, ...)
appNoLimit to a single top-level app folder, e.g. "Base Application"
ignore_caseNoCase-insensitive search. Default false.
max_resultsNoMax number of matches (excluding context). Default 50.
context_linesNoLines of context to include around each match. Default 2.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYes
patternYes
total_matchesYes
matchesYes
truncatedYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnly, idempotent, and openWorld hints. The description adds a key behavioral trait: triggers indexing on first use of a branch, which is not in annotations. No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences, front-loaded with purpose, efficient without wasted words. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given complex parameters and existing output schema, the description covers purpose, filtering, side-effect (indexing). No gaps identified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all 7 parameters. The description adds context on how object_type and app filters work (e.g., file suffix pattern for object_type). This exceeds the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches AL source code using regular expressions (ripgrep), returns matching lines with optional context, and specifies filtering by object_type or app. This distinguishes it from sibling tools like bc_search_fts, implying a difference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use the tool (searching AL code) and how to filter. It doesn't explicitly compare to alternatives like bc_search_fts or bc_find_object_across_branches, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/glachana/bc-source-mcp'

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