refactor: remove links, tags, and status fields from TPMJS spec

These fields are redundant as they already exist in package.json:
- links: Use package.json repository/homepage fields
- tags: Use package.json keywords field
- status: Not needed in tool metadata

Changes:
- Remove TpmjsLinksSchema type definition
- Remove links, tags, and status from TpmjsRichSchema
- Update validation logic to not check these fields
- Update all documentation (spec page, publish page, HOW_TO_PUBLISH_A_TOOL.md)
- Update example tool package.json
- Simplify field reference tables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-12-01 05:53:48 +10:00
parent 054bac9a53
commit 8e8e511e5a
5 changed files with 4 additions and 163 deletions

View file

@ -133,13 +133,6 @@ Complete metadata for maximum visibility:
}
],
"frameworks": ["vercel-ai", "langchain"],
"links": {
"documentation": "https://docs.example.com",
"repository": "https://github.com/yourname/tool",
"homepage": "https://yourwebsite.com"
},
"tags": ["sentiment", "nlp", "emotions", "ai"],
"status": "stable",
"aiAgent": {
"useCase": "Use this tool when users need to analyze sentiment in text, detect emotions, or understand the tone of customer feedback, reviews, or social media posts.",
"limitations": "Only supports English and Spanish. Maximum 10,000 characters per request.",
@ -307,13 +300,6 @@ Here's the complete `package.json` from the published example:
"description": "A structured blog post object with frontmatter, content, and metadata including slug, wordCount, readingTime, and formattedOutput"
},
"frameworks": ["vercel-ai", "langchain"],
"links": {
"documentation": "https://tpmjs.com/tools/createblogpost",
"repository": "https://github.com/ajaxdavis/tpmjs/tree/main/packages/tools/createBlogPost",
"homepage": "https://tpmjs.com"
},
"tags": ["blog", "content", "markdown", "mdx", "writing", "seo"],
"status": "stable",
"aiAgent": {
"useCase": "Use this tool when users need to generate blog posts, articles, or structured content with proper frontmatter and metadata. Ideal for content management systems, static site generators, and documentation sites.",
"limitations": "Does not include AI content generation - you must provide the content. Only formats and structures existing content.",
@ -349,9 +335,6 @@ Here's the complete `package.json` from the published example:
|-------|------|-------------|
| `env` | array | Required environment variables |
| `frameworks` | array | Compatible frameworks |
| `links` | object | Related URLs |
| `tags` | array | Additional tags |
| `status` | string | `stable`, `beta`, or `experimental` |
| `aiAgent` | object | AI agent integration info |
### Categories
@ -401,7 +384,7 @@ Higher scores = better visibility on tpmjs.com!
1. **Use descriptive names** - Make your package name clear and searchable
2. **Complete metadata** - Tier 3 (Rich) tools get 4x the base score
3. **Good documentation** - Link to docs in the `links.documentation` field
3. **Good documentation** - Add documentation URL to package.json homepage or repository fields
4. **Active maintenance** - Regular updates boost download counts
5. **AI-friendly descriptions** - Write the `aiAgent.useCase` field as guidance for AI agents

View file

@ -170,13 +170,6 @@ export default function PublishPage(): React.ReactElement {
}
],
"frameworks": ["vercel-ai", "langchain"],
"links": {
"documentation": "https://docs.example.com",
"repository": "https://github.com/yourname/tool",
"homepage": "https://yourwebsite.com"
},
"tags": ["sentiment", "nlp", "emotions"],
"status": "stable",
"aiAgent": {
"useCase": "Use when users need to analyze sentiment or detect emotions",
"limitations": "English and Spanish only. Max 10,000 characters",
@ -305,9 +298,7 @@ npm publish --access public
"type": "BlogPost",
"description": "Structured blog post with frontmatter"
},
"frameworks": ["vercel-ai", "langchain"],
"tags": ["blog", "content", "markdown"],
"status": "stable"
"frameworks": ["vercel-ai", "langchain"]
}
}`}
/>
@ -331,7 +322,7 @@ npm publish --access public
{
icon: '📚',
title: 'Good documentation',
desc: 'Link to docs in the links.documentation field',
desc: 'Add documentation URL to package.json homepage or repository fields',
},
{
icon: '🔄',

View file

@ -327,56 +327,6 @@ export default function SpecPage(): React.ReactElement {
</div>
</div>
<div>
<h4 className="text-lg font-semibold text-foreground mb-2">
<code>links</code>
</h4>
<p className="text-sm text-foreground-secondary mb-2">
External links. Optional fields:
</p>
<ul className="list-disc list-inside space-y-1 text-sm text-foreground-secondary ml-4">
<li>
<code className="text-foreground">documentation</code> - Full
documentation URL
</li>
<li>
<code className="text-foreground">playground</code> - Interactive demo URL
</li>
<li>
<code className="text-foreground">repository</code> - Source code URL
</li>
<li>
<code className="text-foreground">homepage</code> - Project website
</li>
</ul>
</div>
<div>
<h4 className="text-lg font-semibold text-foreground mb-2">
<code>tags</code>
</h4>
<p className="text-sm text-foreground-secondary">
Array of additional tags for searchability. Maximum 10 tags, each 2-30
characters.
</p>
</div>
<div>
<h4 className="text-lg font-semibold text-foreground mb-2">
<code>status</code>
</h4>
<p className="text-sm text-foreground-secondary mb-2">
Tool maturity level. One of:
</p>
<div className="flex flex-wrap gap-2 mt-2">
{['experimental', 'beta', 'stable', 'deprecated'].map((status) => (
<Badge key={status} variant="outline" size="sm">
{status}
</Badge>
))}
</div>
</div>
<div>
<h4 className="text-lg font-semibold text-foreground mb-2">
<code>aiAgent</code>
@ -422,13 +372,6 @@ export default function SpecPage(): React.ReactElement {
}
],
"frameworks": ["vercel-ai", "langchain"],
"links": {
"documentation": "https://docs.example.com",
"repository": "https://github.com/yourname/tool",
"homepage": "https://yourwebsite.com"
},
"tags": ["sentiment", "nlp", "emotions", "ai"],
"status": "stable",
"aiAgent": {
"useCase": "Use when users need to analyze sentiment or detect emotions in text",
"limitations": "English and Spanish only. Max 10,000 characters per request.",
@ -545,45 +488,6 @@ export default function SpecPage(): React.ReactElement {
<td className="py-3 px-4">No</td>
<td className="py-3 px-4">Compatible AI frameworks</td>
</tr>
<tr className="border-b border-border">
<td className="py-3 px-4">
<code className="text-foreground">links</code>
</td>
<td className="py-3 px-4">object</td>
<td className="py-3 px-4">
<Badge variant="success" size="sm">
Rich
</Badge>
</td>
<td className="py-3 px-4">No</td>
<td className="py-3 px-4">External resource URLs</td>
</tr>
<tr className="border-b border-border">
<td className="py-3 px-4">
<code className="text-foreground">tags</code>
</td>
<td className="py-3 px-4">array</td>
<td className="py-3 px-4">
<Badge variant="success" size="sm">
Rich
</Badge>
</td>
<td className="py-3 px-4">No</td>
<td className="py-3 px-4">Additional search tags (max 10)</td>
</tr>
<tr className="border-b border-border">
<td className="py-3 px-4">
<code className="text-foreground">status</code>
</td>
<td className="py-3 px-4">string</td>
<td className="py-3 px-4">
<Badge variant="success" size="sm">
Rich
</Badge>
</td>
<td className="py-3 px-4">No</td>
<td className="py-3 px-4">Maturity level</td>
</tr>
<tr className="border-b border-border">
<td className="py-3 px-4">
<code className="text-foreground">aiAgent</code>
@ -761,14 +665,6 @@ export default function SpecPage(): React.ReactElement {
<strong className="text-foreground">Invalid env:</strong> Each environment
variable must have a name and description
</li>
<li>
<strong className="text-foreground">Too many tags:</strong> Maximum 10 tags
allowed
</li>
<li>
<strong className="text-foreground">Invalid URL:</strong> Links must be valid
HTTP(S) URLs
</li>
</ul>
</CardContent>
</Card>

View file

@ -80,13 +80,6 @@
"description": "A structured blog post object with frontmatter, content, and metadata including slug, wordCount, readingTime, and formattedOutput"
},
"frameworks": ["vercel-ai", "langchain"],
"links": {
"documentation": "https://tpmjs.com/tools/createblogpost",
"repository": "https://github.com/ajaxdavis/tpmjs/tree/main/packages/tools/createBlogPost",
"homepage": "https://tpmjs.com"
},
"tags": ["blog", "content", "markdown", "mdx", "writing", "seo"],
"status": "stable",
"aiAgent": {
"useCase": "Use this tool when users need to generate blog posts, articles, or structured content with proper frontmatter and metadata. Ideal for content management systems, static site generators, and documentation sites.",
"limitations": "Does not include AI content generation - you must provide the content. Only formats and structures existing content.",

View file

@ -55,18 +55,6 @@ export const TpmjsEnvSchema = z.object({
export type TpmjsEnv = z.infer<typeof TpmjsEnvSchema>;
/**
* External links schema
*/
export const TpmjsLinksSchema = z.object({
documentation: z.string().url().optional(),
playground: z.string().url().optional(),
repository: z.string().url().optional(),
homepage: z.string().url().optional(),
});
export type TpmjsLinks = z.infer<typeof TpmjsLinksSchema>;
/**
* AI Agent guidance schema
*/
@ -102,9 +90,6 @@ export const TpmjsRichSchema = TpmjsMinimalSchema.extend({
frameworks: z
.array(z.enum(['vercel-ai', 'langchain', 'llamaindex', 'haystack', 'semantic-kernel']))
.optional(),
links: TpmjsLinksSchema.optional(),
tags: z.array(z.string().min(2).max(30)).max(10).optional(),
status: z.enum(['experimental', 'beta', 'stable', 'deprecated']).optional(),
aiAgent: TpmjsAiAgentSchema.optional(),
});
@ -135,14 +120,7 @@ export function validateTpmjsField(tpmjs: unknown): ValidationResult {
// Check if it has any rich-tier fields
const data = richResult.data;
const hasRichFields =
data.parameters ||
data.returns ||
data.env ||
data.frameworks ||
data.links ||
data.tags ||
data.status ||
data.aiAgent;
data.parameters || data.returns || data.env || data.frameworks || data.aiAgent;
return {
valid: true,