Skip to main content
Glama
decisionnode

decisionnode/DecisionNode

Official

get_status

Retrieve a project decision status overview with total count and last activity for a quick health check of the decision store.

Instructions

Get project decision status overview including total count and last activity. Use this for a quick health check of the decision store.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe workspace folder name

Implementation Reference

  • The 'get_status' tool handler: fetches project status including total decisions, active decisions count, and last activity from history.
    case 'get_status': {
        ensureProject(args);
        const decisions = await listDecisions();
        const history = await getHistory(1);
    
        return {
            content: [
                {
                    type: 'text',
                    text: JSON.stringify(
                        {
                            project: getCurrentProject(),
                            storePath: getProjectRoot(),
                            totalDecisions: decisions.length,
                            activeDecisions: decisions.filter((d) => d.status === 'active').length,
                            lastActivity: history[0]?.description || 'No activity yet',
                        },
                        null,
                        2
                    ),
                },
            ],
        };
    }
  • Tool registration with name 'get_status' and input schema requiring 'project' (string).
    {
        name: 'get_status',
        description: 'Get project decision status overview including total count and last activity. Use this for a quick health check of the decision store.',
        inputSchema: {
            type: 'object',
            properties: {
                project: {
                    type: 'string',
                    description: 'The workspace folder name',
                },
            },
            required: ['project'],
        },
    },
  • The ensureProject helper validates and sets the current project before executing get_status.
    function ensureProject(args: unknown): void {
        if (args && typeof args === 'object' && 'project' in args && (args as Record<string, unknown>).project) {
            const projectName = (args as Record<string, unknown>).project as string;
    
            // Validate: reject project names that look like paths or corpus names
            // Valid: "my-project", "decisionnode-marketplace"
            // Invalid: "user/repo", "C:\\path\\to\\folder", "/absolute/path"
            if (projectName.includes('/') || projectName.includes('\\') || projectName.includes(':')) {
                throw new Error(
                    `Invalid project name "${projectName}". ` +
                    `Project name must be a simple folder basename (no slashes, colons, or path separators). ` +
                    `Example: "my-project" not "user/repo" or "C:\\path\\to\\folder".`
                );
            }
    
            // Also reject if it looks too long (likely a full path)
            if (projectName.length > 100) {
                throw new Error(
                    `Invalid project name "${projectName.substring(0, 50)}...". ` +
                    `Project name is too long. Use the folder basename only.`
                );
            }
    
            setCurrentProject(projectName);
        }
    }
  • The listDecisions function used by get_status to count total and active decisions.
    export async function listDecisions(scope?: string): Promise<DecisionNode[]> {
        const scopes = scope
            ? [scope]
            : await getAvailableScopes();
    
        const allDecisions: DecisionNode[] = [];
    
        for (const s of scopes) {
            const collection = await loadDecisions(s);
            if (collection.decisions && Array.isArray(collection.decisions)) {
                allDecisions.push(...collection.decisions);
            } else {
                console.warn(`⚠️  Warning: Scope '${s}' is corrupted or empty (missing 'decisions' array). Skipping.`);
            }
        }
    
        return allDecisions;
    }
  • The getHistory function used by get_status to retrieve the latest activity log entry.
    export async function getHistory(limit: number = 20): Promise<ActivityLogEntry[]> {
        const log = await loadActivityLog();
        return log.entries.slice(0, limit);
    }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns a status overview with total count and last activity, indicating a read operation. However, it does not discuss any behavioral aspects like idempotency, side effects, or rate limits, which are less critical for a simple read but still missing.

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 consists of two sentences, is completely front-loaded with the primary action and outputs, and contains no unnecessary words or information. Every sentence serves a clear purpose.

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

Completeness4/5

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

Given the tool's simplicity (one parameter, no output schema, no annotations), the description is largely complete: it states the purpose and the key outputs. It does not explain the output format or aggregation details, but those are likely covered by the sibling tools and the context of a quick health check.

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

Parameters3/5

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

The input schema has 100% coverage with a description for the 'project' parameter ('The workspace folder name'). The tool description does not add extra information beyond what the schema already provides, so the baseline score of 3 is appropriate.

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 gets a project decision status overview including total count and last activity. The verb 'get' and resource 'project decision status overview' are specific, and it distinguishes itself from siblings like 'get_decision' (single decision) and 'list_decisions' (list without status overview).

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 explicitly says 'Use this for a quick health check of the decision store,' which provides clear context for when to use it. It does not mention when not to use or name alternatives, but the guidance is sufficient for a simple tool.

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/decisionnode/DecisionNode'

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