Skip to main content
Glama

cribl_versionControl

Check if version control (git) is enabled on your Cribl instance and verify if a remote repository URL is configured. Identify configuration status for version tracking.

Instructions

Detects if version control (git) is enabled on the Cribl instance and whether a remote repository URL is configured.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'cribl_versionControl' tool. It calls versionControl() from the API client, extracts key details (enabled, remote URL, branch, last commit, status), logs them, and returns the full version info as JSON.
    server.tool(
        'cribl_versionControl',
        'Detects if version control (git) is enabled on the Cribl instance and whether a remote repository URL is configured.',
        VersionControlArgsShape,
        async () => {
            console.error(`[Tool Call] cribl_versionControl`)
            const result = await versionControl()
            if (!result.success || !result.data) {
                console.error(`[Tool Error] cribl_versionControl:`, result.error)
                return { isError: true, content: [{ type: 'text', text: `Error detecting version control: ${result.error}` }] }
            }
            
            // Extract key information from the result
            const versionInfo = result.data;
            const isEnabled = versionInfo.versioning === true;
            const remoteUrl = versionInfo.remote || 'None configured';
            const branch = versionInfo.branch || 'unknown';
            
            // Log detailed version control status
            console.error(`[Tool Success] cribl_versionControl: enabled=${isEnabled}, remoteUrl=${remoteUrl}, branch=${branch}`);
            
            // Log additional git details if available
            if (versionInfo.lastCommit) {
                console.error(`[Tool Success] cribl_versionControl: lastCommit=${versionInfo.lastCommit.id}, message="${versionInfo.lastCommit.message}", author=${versionInfo.lastCommit.author}`);
            }
            
            if (versionInfo.status) {
                const hasChanges = (
                    (versionInfo.status.staged && versionInfo.status.staged.length > 0) || 
                    (versionInfo.status.unstaged && versionInfo.status.unstaged.length > 0) || 
                    (versionInfo.status.untracked && versionInfo.status.untracked.length > 0)
                );
                
                console.error(`[Tool Success] cribl_versionControl: hasChanges=${hasChanges}, staged=${versionInfo.status.staged?.length || 0}, unstaged=${versionInfo.status.unstaged?.length || 0}, untracked=${versionInfo.status.untracked?.length || 0}`);
            }
            
            // Return full details for LLM use
            return { 
                content: [{ 
                    type: 'text', 
                    text: JSON.stringify(versionInfo, null, 2)
                }] 
            }
        }
  • The API client function that performs the actual HTTP GET request to /api/v1/version/info to retrieve version control details from the Cribl instance.
    export async function versionControl(): Promise<ClientResult<VersionControlItem>> {
        const context = 'versionControl';
        const url = '/api/v1/version/info';
        console.error(`[stderr] Attempting API call: GET ${url}`);
        try {
            // API returns items array with version control status details
            const response = await apiClient.get<{ items: VersionControlItem[], count: number }>(url);
            
            if (response.data?.items && Array.isArray(response.data.items) && response.data.items.length > 0) {
                // Return complete information from the first item
                const versionInfo = response.data.items[0];
                console.error(`[stderr] ${context}: Version control enabled=${versionInfo.versioning}, remote=${versionInfo.remote || 'none'}, branch=${versionInfo.branch || 'unknown'}`);
                return { success: true, data: versionInfo };
            } else {
                console.error(`[stderr] ${context}: Unexpected response structure or empty items array:`, response.data);
                return { 
                    success: false, 
                    error: 'Unexpected response structure from version/info endpoint.' 
                };
            }
        } catch (error) {
            const errorMessage = handleApiError(error, context);
            return { success: false, error: errorMessage };
        }
    }
  • VersionControlItem interface defining the response shape including versioning flag, remote URL, branch, status (staged/unstaged/untracked), and lastCommit info.
    interface VersionControlItem {
        versioning: boolean;       // Whether version control is enabled
        remote: string;            // Remote repository URL, if configured
        branch?: string;           // Current branch name
        status?: {                 // Git status information
            staged: any[];         // Staged files information
            unstaged: any[];       // Unstaged changes
            untracked: any[];      // Untracked files
        };
        lastCommit?: {             // Information about the last commit
            id: string;            // Commit hash
            date: string;          // Commit date
            message: string;       // Commit message
            author: string;        // Author of the commit
        };
        [key: string]: any;        // Allow other properties
    }
  • src/server.ts:371-371 (registration)
    Registration of the tool via server.tool() with the name 'cribl_versionControl', description, and empty args schema.
    'cribl_versionControl',
  • Empty Zod args shape for cribl_versionControl since no input parameters are required.
    const VersionControlArgsShape = {}
Behavior4/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool 'detects' enabling of version control and remote URL configuration, indicating a read-only, non-destructive operation. It adds context beyond the tool name but does not detail error cases or return format.

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?

The description is a single sentence that is clear, front-loaded, and contains no unnecessary words. Every word contributes to the tool's purpose.

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 the simplicity of the tool (no parameters, no output schema), the description fully captures what the tool does: detecting two specific aspects of version control. It is complete for its intended use.

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?

The input schema has zero parameters, so the description has no need to add parameter semantics. According to guidelines, baseline is 4 for zero parameters, and the description does not detract from this.

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 uses a specific verb 'detects' and clearly identifies the resource (version control status on Cribl instance). It distinguishes from sibling tools which focus on pipelines, sources, etc., none of which cover version control detection.

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

Usage Guidelines3/5

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

The description implies usage for checking git status, but does not explicitly state when to use this tool versus alternatives or provide exclusions. Given the sibling list, there are no direct alternatives, so the context is clear but guidelines are not explicit.

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/pebbletek/cribl-mcp'

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