generate_person_schema
Create structured Person data for search engines by generating JSON-LD schema markup with fields like name, job title, social profiles, and contact information.
Instructions
Generate a Person JSON-LD schema with common fields like name, job title, social profiles, and more.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Full name of the person | |
| jobTitle | No | Job title or role | |
| url | No | Personal website or profile URL | |
| image | No | URL to an image of the person | |
| No | Email address | ||
| sameAs | No | Array of social profile URLs (LinkedIn, Twitter, etc.) | |
| description | No | Short bio or description | |
| worksFor | No | Organization name | |
| birthDate | No | Date of birth (YYYY-MM-DD) | |
| nationality | No | Nationality |
Implementation Reference
- mcp-server/src/index.ts:540-569 (handler)The registration and handler implementation of the generate_person_schema tool. It calls the buildPersonSchema helper.
server.tool( "generate_person_schema", "Generate a Person JSON-LD schema with common fields like name, job title, social profiles, and more.", { name: z.string().describe("Full name of the person"), jobTitle: z.string().optional().describe("Job title or role"), url: z.string().optional().describe("Personal website or profile URL"), image: z.string().optional().describe("URL to an image of the person"), email: z.string().optional().describe("Email address"), sameAs: z .array(z.string()) .optional() .describe("Array of social profile URLs (LinkedIn, Twitter, etc.)"), description: z.string().optional().describe("Short bio or description"), worksFor: z.string().optional().describe("Organization name"), birthDate: z.string().optional().describe("Date of birth (YYYY-MM-DD)"), nationality: z.string().optional().describe("Nationality"), }, async (params) => { const schema = buildPersonSchema(params); return { content: [ { type: "text" as const, text: JSON.stringify(schema, null, 2), }, ], }; } ); - mcp-server/src/index.ts:184-212 (helper)The helper function buildPersonSchema that constructs the Person JSON-LD object.
function buildPersonSchema(params: { name: string; jobTitle?: string; url?: string; image?: string; email?: string; sameAs?: string[]; description?: string; worksFor?: string; birthDate?: string; nationality?: string; }): object { const fields: Record<string, unknown> = { name: params.name }; if (params.jobTitle) fields.jobTitle = params.jobTitle; if (params.url) fields.url = params.url; if (params.image) fields.image = params.image; if (params.email) fields.email = params.email; if (params.sameAs) fields.sameAs = params.sameAs; if (params.description) fields.description = params.description; if (params.worksFor) { fields.worksFor = { "@type": "Organization", name: params.worksFor, }; } if (params.birthDate) fields.birthDate = params.birthDate; if (params.nationality) fields.nationality = params.nationality; return buildJsonLd("Person", fields); }