Skip to content

Commit 367144a

Browse files
feat: Meta data resources (#33)
* docs: fix bob instructions@ * feat: enrich resource meta-data definitions --------- Co-authored-by: Daniel Butler <[email protected]>
1 parent 7a18c9f commit 367144a

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

tim_mcp/server.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,19 @@ async def get_content(
510510
raise TIMError(f"Unexpected error: {e}") from e
511511

512512

513-
@mcp.resource("file://terraform-whitepaper")
513+
@mcp.resource(
514+
uri="whitepaper://terraform-best-practices-on-ibm-cloud",
515+
name="IBM Terraform Whitepaper",
516+
description="IBM Cloud Terraform Best Practices white paper in markdown format.",
517+
mime_type="text/markdown",
518+
tags={"documentation", "best-practices", "terraform"},
519+
meta={
520+
"version": "1.0",
521+
"team": "IBM Cloud",
522+
"update_frequency": "monthly",
523+
"file_size_bytes": (Path(__file__).parent.parent / "static" / "terraform-white-paper.md").stat().st_size
524+
}
525+
)
514526
async def terraform_whitepaper():
515527
"""IBM Cloud Terraform Best Practices white paper in markdown format."""
516528
whitepaper_path = (
@@ -519,7 +531,19 @@ async def terraform_whitepaper():
519531
return whitepaper_path.read_text(encoding="utf-8")
520532

521533

522-
@mcp.resource("file://module-index")
534+
@mcp.resource(
535+
uri="catalog://terraform-ibm-modules-index",
536+
name="IBM Terraform Modules Index",
537+
description="An compact list of all recommended IBM Terraform modules from the terraform-ibm-modules (TIM) namespace.",
538+
mime_type="application/json",
539+
tags={"index", "modules", "terraform"},
540+
meta={
541+
"version": "1.0",
542+
"team": "IBM Cloud",
543+
"update_frequency": "weekly",
544+
"file_size_bytes": (Path(__file__).parent.parent / "static" / "module_index.json").stat().st_size if (Path(__file__).parent.parent / "static" / "module_index.json").exists() else 0
545+
}
546+
)
523547
async def module_index():
524548
"""
525549
IBM Terraform Modules Index - A comprehensive list of all IBM Terraform modules.

0 commit comments

Comments
 (0)