Skip to content

WebMCP Projects Filter Tool

Draft - awaiting review

The site hosts project documentation (Flappy Bird clones, image generation, etc.) under docs/projects/. As the portfolio grows, filtering by technology stack or project type becomes useful for agents assisting with project discovery.

  • Projects tagged by technology (Astro, MCP, AI, Python, etc.)
  • No programmatic way to find “which projects use X technology?”

Implement WebMCP tool filter_projects_by_tech() to list projects matching a technology filter.

As an AI agent helping a visitor find relevant projects, I want to filter projects by tech stack.

Acceptance Criteria:

  • Agent calls filter_projects_by_tech(tech) with technology name
  • Tool returns matching projects as JSON array
  • Each result includes: title, slug, tech tags
ID Requirement
FR-001 Tool name: filter_projects_by_tech
FR-002 Input: tech parameter (enum of known tech stacks or free string)
FR-003 Output: JSON array { title, slug, technologies }
FR-004 readOnlyHint: true
FR-005 Case-insensitive tech matching
inputSchema: {
type: "object",
properties: {
tech: {
type: "string",
enum: ["astro", "starlight", "mcp", "python", "vue", "firebird", "symfony", "docker"],
description: "Technology to filter by"
}
},
required: ["tech"]
}

Rationale: Enum provides exact matches and guides agents to valid values.

const PROJECTS_DATA = [/* build-time collection */];
document.modelContext.registerTool({
name: "filter_projects_by_tech",
description: "Filter portfolio projects by technology stack. Returns matching projects with title, slug, and tech tags.",
inputSchema: { /* above */ },
execute: async ({ tech }) => {
const matches = PROJECTS_DATA.filter(p =>
p.technologies.some(t => t.toLowerCase().includes(tech.toLowerCase()))
);
return matches.map(p => ({ title: p.title, slug: p.slug, technologies: p.technologies }));
},
annotations: { readOnlyHint: true }
});
Test Input Expected
Match “astro” Returns Astro-based projects
No match “rust” Returns []
Partial match “pytho” Returns Python projects (if fuzzy)
  • Projects must have technologies frontmatter field defined