Skip to main content
Glama

shader_read

Extract and read shader files directly from Unity projects using this tool, enabling efficient access and management of shader assets within the development workflow.

Instructions

Read a shader from Unity project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the shader file

Implementation Reference

  • Handler for shader_read tool: validates input, calls adapter.readShader(path), and formats response with shader content.
    case 'shader_read': { if (!args.path) { throw new Error('path is required'); } const result = await this.adapter.readShader(args.path); return { content: [{ type: 'text', text: `Shader content from ${result.path}:\n\n${result.content}` }] }; }
  • Tool schema definition for shader_read, specifying input requirements (path to shader file).
    name: 'shader_read', description: 'Read a shader from Unity project', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Path to the shader file' } }, required: ['path'] } },
  • Helper method that sends HTTP POST to Unity server with method 'shader/read' and path parameter.
    async readShader(path: string): Promise<any> { return this.call('shader/read', { path }); }

Other Tools

Related 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/zabaglione/mcp-server-unity'

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