Skip to main content
Glama

check_feature

Verify if a specific feature is currently loaded or available within the Emacs environment.

Instructions

Check whether a specific feature is loaded or available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
featureYesFeature name to check.

Implementation Reference

  • The actual implementation of checkFeature function that evaluates Elisp to check if a feature is loaded using featurep. Takes a feature name string and returns the feature name if loaded or 'nil' if not.
    export async function checkFeature(feature: string): Promise<string> {
      const result = await emacsEval(
        `(format "%s" (if (featurep (intern-soft ${quoteString(feature)})) ${quoteString(feature)} "nil"))`
      );
      return stripQuotes(result);
    }
  • src/index.ts:23-23 (registration)
    Tool registration in the MCP server's ListToolsRequestSchema handler, defining the check_feature tool with its description and input schema.
    { name: "check_feature", description: "Check whether a specific feature is loaded or available.", inputSchema: { type: "object", properties: { feature: { type: "string", description: "Feature name to check." } }, required: ["feature"] } },
  • src/index.ts:58-59 (registration)
    The switch case handler that routes check_feature tool calls to the tools.checkFeature function, extracting the feature argument and returning the result as text.
    case "check_feature":
      return text(await tools.checkFeature(args.feature as string));
  • TypeScript type declaration for the checkFeature function, specifying it takes a feature string parameter and returns a Promise<string>.
    export declare function checkFeature(feature: string): Promise<string>;
  • The quoteString helper function used by checkFeature to safely escape strings for use in Elisp expressions.
    export function quoteString(s: string): string {
      const escaped = s
        .replace(/\\/g, "\\\\")
        .replace(/"/g, '\\"')
        .replace(/\n/g, "\\n");
      return `"${escaped}"`;
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions checking availability or loading, but doesn't disclose behavioral traits like what 'loaded' means, whether it requires specific permissions, potential side effects, or response format. This is a significant gap for a tool with no annotation coverage.

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, clear sentence with zero waste, efficiently conveying the core purpose. It's appropriately sized and front-loaded, making it easy to understand quickly.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate but lacks depth. It doesn't explain return values or behavioral context, which is a gap since no output schema exists. It meets basic needs but could be more informative.

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?

Schema description coverage is 100%, with the parameter 'feature' documented as 'Feature name to check.' The description adds no additional meaning beyond this, such as examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('check') and resource ('feature'), specifying it determines availability or loading status. It doesn't explicitly distinguish from siblings like 'list_features', but the focus on a single feature provides some differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as 'list_features' (which might list all features) or 'symbol_exists' (which could check for symbols). There's no mention of prerequisites, context, or exclusions, leaving usage unclear relative to siblings.

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/landermkerbey/ragmacs-mcp'

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