Skip to main content
Glama

Get Material Profile

get_material_profile

Get a comprehensive material science profile for any 3D printing filament, covering strength, flexibility, UV resistance, food safety, and more.

Instructions

Get a detailed material science profile for a specific material type. Includes strength, flexibility, UV resistance, food safety, moisture sensitivity, difficulty level, typical uses, pros/cons, and nozzle requirements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
materialYesMaterial type name (e.g., "PLA", "PETG", "ABS", "TPU")

Implementation Reference

  • The main handler registration function 'registerGetMaterialProfile' that registers the 'get_material_profile' tool on the MCP server. It defines the input schema (material name string), queries the database with fallback uppercase matching, returns a formatted markdown profile or an error with available materials if not found.
    export function registerGetMaterialProfile(
      server: McpServer,
      db: Database.Database,
    ): void {
      server.registerTool(
        'get_material_profile',
        {
          title: 'Get Material Profile',
          description:
            'Get a detailed material science profile for a specific material type. Includes strength, flexibility, UV resistance, food safety, moisture sensitivity, difficulty level, typical uses, pros/cons, and nozzle requirements.',
          inputSchema: {
            material: z
              .string()
              .describe('Material type name (e.g., "PLA", "PETG", "ABS", "TPU")'),
          },
        },
        async ({ material }) => {
          // Try exact match first, then uppercase
          let profile = getMaterialProfile(db, material);
          if (!profile) {
            profile = getMaterialProfile(db, material.toUpperCase());
          }
    
          if (!profile) {
            const available = getAvailableMaterialNames(db);
            return {
              isError: true,
              content: [
                {
                  type: 'text' as const,
                  text: `Material "${material}" not found. Available materials: ${available.join(', ')}`,
                },
              ],
            };
          }
    
          const lines = [
            `# ${profile.material_name} Material Profile`,
            '',
            '## Temperature Settings',
            `- Print Temperature: ${profile.print_temp_min}-${profile.print_temp_max}°C`,
            `- Bed Temperature: ${profile.bed_temp_min}-${profile.bed_temp_max}°C`,
            '',
            '## Properties',
            `- Strength: ${profile.strength}`,
            `- Flexibility: ${profile.flexibility}`,
            `- UV Resistance: ${profile.uv_resistance}`,
            `- Food Safe: ${profile.food_safe}`,
            `- Moisture Sensitivity: ${profile.moisture_sensitivity}`,
            '',
            '## Printing',
            `- Difficulty: ${profile.difficulty}`,
            `- Nozzle: ${profile.nozzle_notes ?? 'No special requirements'}`,
            `- Enclosure Needed: ${profile.enclosure_needed ? 'Yes' : 'No'}`,
            '',
            '## Usage',
            `- Typical Uses: ${profile.typical_uses}`,
            `- Pros: ${profile.pros}`,
            `- Cons: ${profile.cons}`,
          ];
    
          return { content: [{ type: 'text' as const, text: lines.join('\n') }] };
        },
      );
    }
  • The MaterialProfileRow interface defining all fields returned for a material profile: temperature ranges, strength, flexibility, UV resistance, food safe, moisture sensitivity, difficulty, typical uses, pros/cons, nozzle notes, enclosure needed.
    export interface MaterialProfileRow {
      id: number;
      material_name: string;
      print_temp_min: number | null;
      print_temp_max: number | null;
      bed_temp_min: number | null;
      bed_temp_max: number | null;
      strength: string;
      flexibility: string;
      uv_resistance: string;
      food_safe: string;
      moisture_sensitivity: string;
      difficulty: string;
      typical_uses: string;
      pros: string;
      cons: string;
      nozzle_notes: string | null;
      enclosure_needed: number;
    }
  • The database query helper 'getMaterialProfile' that executes SELECT * FROM material_profiles WHERE material_name = ? and returns the row or null.
    export function getMaterialProfile(
      db: Database.Database,
      name: string,
    ): MaterialProfileRow | null {
      const row = db
        .prepare('SELECT * FROM material_profiles WHERE material_name = ?')
        .get(name) as MaterialProfileRow | undefined;
      return row ?? null;
    }
  • src/server.ts:14-53 (registration)
    Registration of the tool: import of registerGetMaterialProfile at line 14 and invocation at line 47 in createServer().
    import { registerGetMaterialProfile } from './tools/get-material-profile.js';
    import { registerCompareMaterials } from './tools/compare-materials.js';
    import { registerRecommendMaterial } from './tools/recommend-material.js';
    import { registerDiagnosePrintIssue } from './tools/diagnose-print-issue.js';
    
    export interface ServerOptions {
      dbPath?: string;
      db?: import('better-sqlite3').Database;
    }
    
    export function createServer(options?: ServerOptions): McpServer {
      const __dirname = path.dirname(fileURLToPath(import.meta.url));
      let version = '0.0.0';
      try {
        const pkg = JSON.parse(
          readFileSync(path.join(__dirname, '..', 'package.json'), 'utf-8'),
        );
        version = pkg.version;
      } catch {
        // Fallback version if package.json not found (e.g., in tests)
      }
    
      const server = new McpServer({
        name: '3dprint-oracle',
        version,
      });
    
      const db = options?.db ?? getDatabase(options?.dbPath);
    
      registerSearchFilaments(server, db);
      registerGetFilament(server, db);
      registerListManufacturers(server, db);
      registerListMaterials(server, db);
      registerGetMaterialProfile(server, db);
      registerCompareMaterials(server, db);
      registerRecommendMaterial(server, db);
      registerDiagnosePrintIssue(server, db);
    
      return server;
    }
Behavior2/5

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

No annotations are provided; the description does not disclose if the operation is read-only, requires authentication, or has side effects. It only lists output fields, lacking behavioral context such as safety or idempotency.

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, front-loading the purpose and following with key contents. Every sentence adds value with no redundancy.

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 absence of an output schema, the description adequately outlines the profile contents. However, it could mention error handling or required permissions to be fully complete.

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% description coverage for the single parameter 'material', with a clear description. The tool description adds examples but does not significantly extend meaning beyond the schema.

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 a detailed material science profile for a specific material type, listing specific properties. It is distinct from sibling tools like list_materials (which lists available materials) and compare_materials (which compares multiple materials).

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 does not explicitly state when to use this tool versus alternatives. While it implies use when a detailed profile of a single material is needed, no guidance on exclusions or prerequisites is provided.

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/gregario/3dprint-oracle'

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