Skip to main content
Glama

get_guidelines

Retrieve brand guidelines, voice and tone documentation, accessibility rules, and usage policies as full markdown content.

Instructions

Get brand guidelines, voice and tone documentation, accessibility rules, and usage policies. Returns full markdown content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNoDesign context to queryall
sectionNoFilter by section: brand-voice, accessibility, logo-usage, typography, colors, general

Implementation Reference

  • Main handler function for the get_guidelines tool. Resolves the design context (all/marketing/product), filters guidelines by optional section, and returns the matching guidelines as JSON.
    export function handler(index: DesignSystemIndex, args: GetGuidelinesArgs) {
      const ctx = args.context ?? 'all';
      const resolved = ctx === 'all' ? index.resolved.all :
        ctx === 'marketing' ? index.resolved.marketing :
        ctx === 'product' ? index.resolved.product :
        index.resolved.all;
    
      let guidelines = resolved.guidelines;
    
      if (args.section) {
        const section = args.section.toLowerCase();
        guidelines = guidelines.filter((g) => g.section?.toLowerCase().includes(section) || g.title.toLowerCase().includes(section));
      }
    
      if (guidelines.length === 0) {
        return [{ type: 'text' as const, text: `No guidelines found${args.section ? ` for section "${args.section}"` : ''} in ${ctx} context.` }];
      }
    
      const output = guidelines.map((g) => ({
        title: g.title,
        section: g.section,
        context: g.context,
        content: g.content,
      }));
    
      return [{ type: 'text' as const, text: JSON.stringify(output, null, 2) }];
    }
  • Input schema for the get_guidelines tool, defining the context and section filter parameters.
    export const INPUT_SCHEMA = {
      type: 'object' as const,
      properties: {
        context: { type: 'string', enum: ['marketing', 'product', 'shared', 'all'], default: 'all', description: 'Design context to query' },
        section: { type: 'string', description: 'Filter by section: brand-voice, accessibility, logo-usage, typography, colors, general' },
      },
    };
  • TypeScript type definition for GetGuidelinesArgs with optional context and section fields.
    /** Arguments for the `get_guidelines` MCP tool */
    export interface GetGuidelinesArgs {
      /** Filter guidelines to a specific design context */
      context?: 'marketing' | 'product' | 'shared' | 'all';
    
      /** Filter by guideline section (e.g. "brand-voice", "accessibility") */
      section?: string;
    }
  • Registration of get_guidelines in the CallToolRequestSchema handler, dispatching to the guidelines module's handler.
    case guidelines.TOOL_NAME:
      return { content: guidelines.handler(index, args as never) };
  • Import of the get-guidelines module in the tools index for registration.
    import * as guidelines from './get-guidelines.js';
Behavior3/5

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

No annotations are provided, so the description carries the burden of disclosing behavior. It states that the tool returns 'full markdown content', which is informative but does not mention whether the operation is read-only (likely), requires authentication, or has any side effects. The behavior is minimally disclosed.

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 long, front-loading the core purpose. Every sentence provides necessary information without extraneous content. It is appropriately concise and structured.

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?

The tool has two parameters, no output schema, and no annotations. The description explains the purpose and output format adequately, but does not clarify how the 'context' and 'section' parameters interact (e.g., are they combined or exclusive?), nor does it detail the structure of the returned markdown. Given the simplicity, it is minimally complete but has gaps.

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 two parameters with descriptions and an enum for 'context'. The description adds that the output is 'full markdown content', but does not add specific meaning to the parameters beyond what the schema already covers. Since schema description coverage is 100%, a baseline 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 retrieves brand guidelines, voice and tone documentation, accessibility rules, and usage policies. It uses a specific verb ('Get') and resource, and distinguishes itself from sibling tools like get_colors or get_logos by being the comprehensive guidelines tool.

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 the tool is for obtaining a broad set of guidelines, but it does not provide explicit guidance on when to use this tool versus the many sibling tools (e.g., get_brand_overview, get_colors). An agent would benefit from knowing that this returns a broader document, while other tools return specific subsets.

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/ejwhite7/brandkit-mcp'

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