bc-code-intelligence-mcp
Version:
BC Code Intelligence MCP Server - Complete Specialist Bundle with AI-driven expert consultation, seamless handoffs, and context-preserving workflows
282 lines (203 loc) • 9.31 kB
Markdown
---
title: "AL Object ID Ninja MCP Integration"
domain: "alex-architect"
bc_versions: "14+"
difficulty: "intermediate"
tags: ["object-ids", "mcp-integration", "id-management", "team-collaboration", "tooling"]
related_topics:
- "../shared/object-id-ranges.md"
- "../../domains/shared/naming-conventions.md"
applies_to:
- "AL Language"
- "Multi-Developer Teams"
- "AppSource Development"
last_updated: "2025-10-27"
conditional_mcp: "al-objid-mcp-server"
---
# AL Object ID Ninja MCP Integration
## Overview
When the **AL Object ID Ninja MCP** (`al-objid-mcp-server`) is available in your environment, you have access to intelligent object ID collision prevention and management. This topic explains when to delegate ID management to Object ID Ninja vs. handling it within BC Code Intelligence.
**Key Principle**: Object ID Ninja is the specialist tool for ID collision prevention - always defer to it when available.
## When Object ID Ninja is Available
### **Detection**
Check if Object ID Ninja is in the available MCPs list:
```
get_workspace_info()
// Returns: { available_mcps: ["al-objid-mcp-server", ...] }
```
### **What Object ID Ninja Provides**
**LITE Mode** (Individual Developers):
- Local object ID pool management
- Collision detection within workspace
- Auto-suggestion of next available IDs
- Git integration for app identification
**STANDARD Mode** (Teams):
- Backend integration for shared ID pools
- Team-wide collision prevention
- Real-time ID reservation
- Multi-developer coordination
### **When to Delegate to Object ID Ninja**
✅ **ALWAYS delegate** when user asks about:
- "What object IDs should I use?"
- "Get me the next available ID for a table"
- "Check if object ID X is available"
- "Reserve object IDs for my feature"
- "Set up object ID management for the team"
✅ **Object ID Ninja Tools** (examples - actual tool names may vary):
- `objid_get_next_available` - Get next free ID in range
- `objid_reserve_id` - Reserve ID for object
- `objid_check_availability` - Check if ID is free
- `objid_configure_ranges` - Set up ID ranges for teams/apps
### **Delegation Pattern**
```markdown
**Alex's Response:**
"I see you have AL Object ID Ninja available in your environment. This is perfect for object ID management!
Let me check the next available table ID for you using Object ID Ninja..."
[Use Object ID Ninja MCP tool to get next ID]
"Object ID Ninja suggests table ID 50100. This ID is available and reserved for your use."
```
### **Why Delegate?**
1. **Real-Time Data**: Object ID Ninja has live backend connection for team coordination
2. **Collision Prevention**: Prevents simultaneous ID claims by multiple developers
3. **Range Management**: Understands configured ranges for different apps/teams
4. **Git Integration**: Auto-detects app context from repository
5. **Reservation System**: Locks IDs once assigned to prevent conflicts
## When Object ID Ninja is NOT Available
### **Fallback Strategy**
If `al-objid-mcp-server` is NOT in `available_mcps`:
✅ **BC Code Intelligence provides**:
- General ID range guidance (50000-99999 for customizations)
- AppSource range recommendations
- Best practices for ID organization
- Manual collision avoidance strategies
✅ **Alex's Fallback Response**:
```markdown
"For object ID management, I recommend following these Business Central guidelines:
**Custom Object Ranges:**
- Tables: 50000-99999
- Pages: 50000-99999
- Reports: 50000-99999
- Codeunits: 50000-99999
**AppSource Apps:**
- Must use assigned publisher range from Microsoft
**Best Practices:**
- Reserve ranges by feature or module (e.g., 50100-50199 for Sales Priority)
- Document ID assignments in a shared spreadsheet or wiki
- Check existing objects before assigning new IDs: `Get-ChildItem -Recurse *.al | Select-String 'table 50100'`
**Team Recommendation:**
Consider installing AL Object ID Ninja MCP for automated collision prevention and team coordination. It provides real-time ID management with backend synchronization.
[Installation: https://alguidelines.dev/docs/agentic-coding/communityresources/tools/al-objid-mcp-server/]
```
### **What NOT to Do Without Object ID Ninja**
❌ **Don't claim** to reserve IDs (we can't - no backend)
❌ **Don't guarantee** ID availability (can't check team's live pool)
❌ **Don't suggest** specific IDs without caveat about manual verification
## Architecture Guidance with Object ID Ninja
### **Project Setup**
When designing new apps/features with Object ID Ninja available:
1. **Configure ID Ranges First**
```markdown
"Before we start creating objects, let's set up your ID ranges with Object ID Ninja..."
[Use objid_configure_ranges tool]
"I've configured:
- Sales Priority Module: Tables 50100-50149, Pages 50100-50149
- Inventory Extension: Tables 50150-50199, Pages 50150-50199"
```
2. **Request IDs During Design**
```markdown
"For your Sales Priority Management feature, we need:
- 1 Table (Customer Priority Levels)
- 2 Pages (Priority Setup, Priority List)
- 1 Codeunit (Priority Calculator)
Let me request these IDs from Object ID Ninja..."
[Use objid_get_next_available for each object type]
"Object ID Ninja has assigned:
- Table 50100 - Customer Priority Levels
- Page 50100 - Customer Priority Setup
- Page 50101 - Customer Priority List
- Codeunit 50100 - Priority Calculator"
```
### **App.json Integration**
Object ID Ninja can auto-detect app context from Git, but you can also specify:
```json
{
"id": "12345678-1234-1234-1234-123456789012",
"name": "SalesPriorityManager",
"publisher": "Contoso",
"version": "1.0.0.0",
"idRanges": [
{
"from": 50100,
"to": 50199
}
]
}
```
Object ID Ninja respects these configured ranges.
## Team Collaboration Patterns
### **Multi-Developer Scenario**
**Without Object ID Ninja:**
- Developers manually coordinate via spreadsheet/wiki
- Risk of simultaneous ID claims
- Merge conflicts when IDs collide
**With Object ID Ninja (STANDARD mode):**
- Backend automatically coordinates ID assignments
- Developers get unique IDs instantly
- No coordination overhead
- Zero collision risk
### **Code Review Guidance**
When reviewing PRs with Object ID Ninja available:
```markdown
"Let me verify the object IDs in this PR are properly reserved..."
[Use objid_check_availability for each ID]
✅ "All object IDs (50100-50103) are validly reserved to this developer."
OR
⚠️ "Table 50105 is not reserved to you - it's assigned to another developer. Let's get you a different ID..."
[Use objid_get_next_available to suggest alternative]
```
## AppSource Development
### **Publisher Range Management**
**With Object ID Ninja:**
```markdown
"For AppSource submission, you need a dedicated publisher range from Microsoft.
Once you have your range (e.g., 70000-70999), configure it in Object ID Ninja..."
[Use objid_configure_ranges with publisher range]
"Now Object ID Ninja will only assign IDs from your approved publisher range, ensuring AppSource compliance."
```
**Without Object ID Ninja:**
```markdown
"For AppSource, contact Microsoft to get your publisher ID range assignment.
Manually verify all objects fall within your assigned range before submission. Document your range in app.json idRanges."
```
## Recommendations and Handoffs
### **When to Recommend Object ID Ninja**
Suggest installation if user mentions:
- "We keep having ID conflicts"
- "How do we coordinate IDs across the team?"
- "Manual ID tracking is painful"
- "Can AI help with object ID management?"
### **Installation Guidance**
```markdown
"Your team would benefit greatly from AL Object ID Ninja MCP!
**Benefits:**
- Automatic ID collision prevention
- Team-wide coordination (STANDARD mode)
- Git integration for auto-detection
- Real-time ID reservation
**Installation:**
1. Visit: https://alguidelines.dev/docs/agentic-coding/communityresources/tools/al-objid-mcp-server/
2. Choose LITE (individual) or STANDARD (team backend) mode
3. Configure in your MCP client (VS Code, Claude Desktop, etc.)
4. Restart and provide available_mcps when calling set_workspace_info
Once installed, I'll be able to request IDs directly from Object ID Ninja for you!"
```
## Best Practices
1. **Always Check Availability**: Use `get_workspace_info()` at conversation start to detect MCP ecosystem
2. **Transparent Delegation**: Tell user "I'm using Object ID Ninja to..." when delegating
3. **Fallback Gracefully**: Provide manual guidance when Object ID Ninja not available
4. **Encourage Adoption**: Recommend Object ID Ninja for teams with ID management pain
5. **Trust the Specialist**: Object ID Ninja's ID assignments are authoritative - don't second-guess them
## See Also
- [Object ID Ranges](../shared/object-id-ranges.md) - Standard BC object ID ranges
- [Naming Conventions](../../domains/shared/naming-conventions.md) - Object naming standards
- [AL Object ID Ninja MCP Documentation](https://alguidelines.dev/docs/agentic-coding/communityresources/tools/al-objid-mcp-server/)