Skip to main content
Glama

show_default_settings

Read-onlyIdempotent

Show your default paper size and orientation to honor your account preferences. Use this when you haven't specified page settings to avoid relying on A4/Portrait.

Instructions

Show the user's default paper size and orientation preferences (set on their account page). Useful when the user hasn't specified pageSize/orientation explicitly — call this to honor their defaults instead of using A4/Portrait blindly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
default_page_sizeYesUser's preferred page size
default_orientationYesUser's preferred page orientation

Implementation Reference

  • The actual handler function for the show_default_settings tool. Currently returns hardcoded defaults (A4, Portrait) as a placeholder since the user defaults API is not yet implemented.
    export async function handleShowDefaultSettings(
      apiClient: MDMagicApiClient,
      args: any
    ): Promise<CallToolResult> {
      try {
        console.error('[show_default_settings] Fetching user default settings...');
    
        // For now, return default values since we need to implement user defaults API
        return {
          content: [
            {
              type: "text",
              text: `📋 **Your Default Document Settings**
    
    **📄 Default Page Size:** A4
    **🔄 Default Orientation:** Portrait
    
    💡 **How to use:**
    - When converting documents, these defaults are used automatically
    - You can override by specifying \`pageSize\` and \`orientation\` in \`convert_document\`
    - Available page sizes: A3, A4, Executive, US_Legal, US_Letter
    - Available orientations: Portrait, Landscape`
            }
          ]
        };
    
      } catch (error: any) {
        console.error('[show_default_settings] Error:', error.message);
        throw error;
      }
    }
  • Unified tool registration index. Imports handleShowDefaultSettings and routes 'show_default_settings' case to it in the switch statement (lines 42-43).
    // Tool registration index - UNIFIED HANDLER ARCHITECTURE
    import { Server } from '@modelcontextprotocol/sdk/server/index.js';
    import { CallToolRequestSchema, CallToolRequest, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
    import { MDMagicApiClient } from '../services/apiClient.js';
    import { CreditCalculator } from '../services/creditCalculator.js';
    import { handleConvertDocument } from './convertDocument.js';
    import { handleListAllTemplates, handleListBuiltinTemplates, handleListCustomTemplates } from './listTemplates.js';
    import { handleShowDefaultSettings } from './userSettings.js';
    import { handleCheckCreditBalance, handleEstimateConversionCost } from './creditTools.js';
    import { handleValidateMarkdown } from './validateMarkdown.js';
    import { handleGetTemplateDetails } from './getTemplateDetails.js';
    import { handleRecommendTemplate } from './recommendTemplate.js';
    
    export async function registerAllTools(
      server: Server,
      apiClient: MDMagicApiClient
    ): Promise<void> {
      console.error('🔧 Registering MCP tools with unified handler...');
    
      // Initialize credit calculator for credit tools
      const creditCalculator = new CreditCalculator(apiClient);
    
      // Register a SINGLE unified handler for all tools
      server.setRequestHandler(CallToolRequestSchema, async (request: CallToolRequest): Promise<CallToolResult> => {
        const toolName = request.params.name;
        console.error(`[MCP] Handling tool request: ${toolName}`);
    
        try {
          switch (toolName) {
            case 'convert_document':
              return await handleConvertDocument(apiClient, request.params.arguments);
              
            case 'list_all_templates':
              return await handleListAllTemplates(apiClient, request.params.arguments);
              
            case 'list_builtin_templates':
              return await handleListBuiltinTemplates(apiClient, request.params.arguments);
              
            case 'list_custom_templates':
              return await handleListCustomTemplates(apiClient, request.params.arguments);
              
            case 'show_default_settings':
              return await handleShowDefaultSettings(apiClient, request.params.arguments);
              
            case 'check_credit_balance':
              return await handleCheckCreditBalance(creditCalculator, request.params.arguments);
              
            case 'estimate_conversion_cost':
              return await handleEstimateConversionCost(creditCalculator, request.params.arguments);
    
            case 'validate_markdown':
              return await handleValidateMarkdown(apiClient, request.params.arguments);
    
            case 'get_template_details':
              return await handleGetTemplateDetails(apiClient, request.params.arguments);
    
            case 'recommend_template':
              return await handleRecommendTemplate(apiClient, request.params.arguments);
    
            default:
              throw new Error(`Unknown tool: ${toolName}`);
          }
        } catch (error: any) {
          console.error(`[MCP] Error handling ${toolName}:`, error);
          return {
            content: [
              {
                type: "text",
                text: `❌ Error: ${error.message}`
              }
            ],
            isError: true
          };
        }
      });
    
      console.error('✅ All MCP tools registered successfully with unified handler');
      console.error('📋 Available tools: convert_document, list_all_templates, list_builtin_templates, list_custom_templates, show_default_settings, check_credit_balance, estimate_conversion_cost, validate_markdown, get_template_details, recommend_template');
    }
  • Tool definition/schema for show_default_settings including description, annotations, inputSchema (empty object - no inputs), and outputSchema (default_page_size and default_orientation). Defined in getToolDefinitions() for the ListToolsRequestSchema handler.
    {
      name: "show_default_settings",
      description: "Show the user's default paper size and orientation preferences (set on their account page). Useful when the user hasn't specified pageSize/orientation explicitly — call this to honor their defaults instead of using A4/Portrait blindly.",
      annotations: {
        title: "Show user's default page size and orientation",
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true
      },
      inputSchema: {
        type: "object" as const,
        properties: {}
      },
      outputSchema: {
        type: "object" as const,
        properties: {
          default_page_size: { type: "string", description: "User's preferred page size" },
          default_orientation: { type: "string", description: "User's preferred page orientation" }
        },
        required: ["default_page_size", "default_orientation"]
      }
    },
Behavior4/5

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

Annotations already provide readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. The description adds context about reading account page preferences, which aligns with annotations and gives slightly more insight into the data source.

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 only two sentences, front-loading the purpose and immediately following with usage guidance. Every word adds value with no redundancy.

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 tool has no parameters and has an output schema, the description sufficiently covers purpose and usage. No additional details are necessary for correct invocation.

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?

No parameters exist, and schema coverage is 100%. The description does not need to elaborate on parameters; baseline score of 4 for zero-parameter tools 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 shows default paper size and orientation preferences from the user's account page, using specific verb 'show' and resource 'defaults'. It distinguishes from sibling tools by focusing on a specific setting retrieval.

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

Usage Guidelines5/5

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

The description explicitly advises when to use this tool (when user hasn't specified pageSize/orientation) and contrasts with a default behavior (A4/Portrait), providing clear context for appropriate invocation.

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/MDMagic-MCP/mdmagic-mcp-server'

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