Skip to main content
Glama

generate_organization_schema

Create JSON-LD schema markup for organizations to enhance SEO and structured data visibility. Input organization details like name, URL, and description to generate compliant schema code.

Instructions

Generate an Organization JSON-LD schema for companies, non-profits, or other organizations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesOrganization name
urlNoOfficial website URL
logoNoLogo image URL
descriptionNoBrief description of the organization
foundingDateNoFounding date (YYYY-MM-DD)
founderNoFounder name
sameAsNoArray of social profile URLs

Implementation Reference

  • Tool registration and handler for 'generate_organization_schema'.
    server.tool(
      "generate_organization_schema",
      "Generate an Organization JSON-LD schema for companies, non-profits, or other organizations.",
      {
        name: z.string().describe("Organization name"),
        url: z.string().optional().describe("Official website URL"),
        logo: z.string().optional().describe("Logo image URL"),
        description: z
          .string()
          .optional()
          .describe("Brief description of the organization"),
        foundingDate: z
          .string()
          .optional()
          .describe("Founding date (YYYY-MM-DD)"),
        founder: z.string().optional().describe("Founder name"),
        sameAs: z
          .array(z.string())
          .optional()
          .describe("Array of social profile URLs"),
      },
      async (params) => {
        const schema = buildOrganizationSchema(params);
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(schema, null, 2),
            },
          ],
        };
      }
    );
  • Helper function that constructs the organization JSON-LD structure.
    function buildOrganizationSchema(params: {
      name: string;
      url?: string;
      logo?: string;
      description?: string;
      foundingDate?: string;
      founder?: string;
      sameAs?: string[];
    }): object {
      const fields: Record<string, unknown> = { name: params.name };
      if (params.url) fields.url = params.url;
      if (params.logo) fields.logo = params.logo;
      if (params.description) fields.description = params.description;
      if (params.foundingDate) fields.foundingDate = params.foundingDate;
      if (params.founder) {
        fields.founder = {
          "@type": "Person",
          name: params.founder,
        };
      }
      if (params.sameAs) fields.sameAs = params.sameAs;
      return buildJsonLd("Organization", fields);
    }

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/sharozdawa/schema-gen'

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