Skip to main content
Glama

Get a single ISM control

get_control

Retrieve detailed information for a specific ISM control by providing its OSCAL ID or label. Includes title, group path, applicability, and statement.

Instructions

Returns the full detail (title, group path, applicability, statement) for a single ISM control. Accepts either the OSCAL id (e.g. ism-principle-gov-01) or the human label (e.g. GOV-01).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
controlIdYesEither OSCAL id (e.g. "ism-principle-gov-01") or label (e.g. "GOV-01").
versionNo
formatNo

Implementation Reference

  • The get_control tool handler: resolves the version, loads flattened controls, matches by controlId (OSCAL id or label), and returns full control detail in JSON or Markdown format.
    server.registerTool(
      "get_control",
      {
        title: "Get a single ISM control",
        description:
          "Returns the full detail (title, group path, applicability, statement) for a single ISM control. Accepts either the OSCAL id (e.g. ism-principle-gov-01) or the human label (e.g. GOV-01).",
        inputSchema: {
          controlId: z
            .string()
            .describe(
              'Either OSCAL id (e.g. "ism-principle-gov-01") or label (e.g. "GOV-01").',
            ),
          version: z.string().optional(),
          format: z.enum(["json", "markdown"]).optional(),
        },
      },
      async ({ controlId, version, format }) => {
        const v = await resolveVersion(version);
        const flat = await loadFlat(v.tag);
        const match = findControlMatch(flat, controlId);
        if (!match) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `No control matched "${controlId}" in ISM ${v.id}.`,
              },
            ],
          };
        }
        if (format === "markdown") {
          return txt(controlToMarkdown(match, v.id));
        }
        return txt({
          version: v.id,
          id: match.id,
          label: match.label,
          title: match.title,
          section: match.groupPath,
          applicability: match.applicability,
          statement: match.statement,
          raw: match.raw,
        });
      },
    );
  • src/index.ts:295-340 (registration)
    Registration of the get_control tool with the MCP server, including title, description, and input schema.
    server.registerTool(
      "get_control",
      {
        title: "Get a single ISM control",
        description:
          "Returns the full detail (title, group path, applicability, statement) for a single ISM control. Accepts either the OSCAL id (e.g. ism-principle-gov-01) or the human label (e.g. GOV-01).",
        inputSchema: {
          controlId: z
            .string()
            .describe(
              'Either OSCAL id (e.g. "ism-principle-gov-01") or label (e.g. "GOV-01").',
            ),
          version: z.string().optional(),
          format: z.enum(["json", "markdown"]).optional(),
        },
      },
      async ({ controlId, version, format }) => {
        const v = await resolveVersion(version);
        const flat = await loadFlat(v.tag);
        const match = findControlMatch(flat, controlId);
        if (!match) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `No control matched "${controlId}" in ISM ${v.id}.`,
              },
            ],
          };
        }
        if (format === "markdown") {
          return txt(controlToMarkdown(match, v.id));
        }
        return txt({
          version: v.id,
          id: match.id,
          label: match.label,
          title: match.title,
          section: match.groupPath,
          applicability: match.applicability,
          statement: match.statement,
          raw: match.raw,
        });
      },
    );
  • Input schema for get_control: requires controlId string, optional version string, and optional format enum (json/markdown).
    inputSchema: {
      controlId: z
        .string()
        .describe(
          'Either OSCAL id (e.g. "ism-principle-gov-01") or label (e.g. "GOV-01").',
        ),
      version: z.string().optional(),
      format: z.enum(["json", "markdown"]).optional(),
    },
  • Helper used by get_control to match a control by OSCAL id or human label (case-insensitive).
    function findControlMatch(flat: FlatControl[], controlId: string): FlatControl | undefined {
      const needle = controlId.toLowerCase();
      return (
        flat.find((c) => c.id.toLowerCase() === needle) ??
        flat.find((c) => c.label.toLowerCase() === needle) ??
        flat.find((c) => c.id.toLowerCase().endsWith(needle))
      );
    }
  • Renders a FlatControl as Markdown, used by get_control when format is 'markdown'.
    export function controlToMarkdown(c: FlatControl, version: string): string {
      const lines: string[] = [];
      lines.push(`# ${c.label} — ${c.title}`);
      lines.push("");
      lines.push(`- **Control ID:** \`${c.id}\``);
      lines.push(`- **ISM version:** ${version}`);
      if (c.groupPath.length > 0) {
        lines.push(`- **Section:** ${c.groupPath.join(" › ")}`);
      }
      if (c.applicability.length > 0) {
        lines.push(`- **Applicability:** ${c.applicability.join(", ")}`);
      }
      lines.push("");
      if (c.statement) {
        lines.push("## Statement");
        lines.push("");
        lines.push(c.statement);
        lines.push("");
      }
      return lines.join("\n");
    }
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 describes the operation as returning details, but does not mention error handling (e.g., if controlId not found) or confirm it is read-only. For a simple get, this is adequate but not comprehensive.

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 two sentences: first states purpose and output, second explains input. It is front-loaded and contains no unnecessary words.

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 (single control fetch, 3 parameters, no output schema), the description is fairly complete. It explains what is returned and how to specify the control. Minor omission: behavior when controlId is invalid or version is omitted, but overall sufficient.

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 low (33%: only controlId has a description). The description adds value by explaining the two accepted formats for controlId, but it does not add semantics for version or format beyond what the schema provides (enum for format, no description for version).

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 returns full detail for a single ISM control, listing specific fields (title, group path, applicability, statement). It distinguishes from sibling tools like list_controls or get_controls which handle multiple controls.

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 this tool (when a single control's details are needed) and how to identify it (OSCAL id or human label). However, it does not explicitly state when not to use it or provide direct comparisons to alternatives, though 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/RusticEagle/ism-mcp'

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