Skip to main content

Add your description here

Project description

uv run mcp dev src/prompt_writing_assistant/mcp.py

@mcp.tool()
async def my_tool(x: int, ctx: Context) -> str:
    """Tool that uses context capabilities.
    
    The Context object provides the following capabilities:

ctx.request_id - Unique ID for the current request
ctx.client_id - Client ID if available
ctx.fastmcp - Access to the FastMCP server instance (see FastMCP Properties)
ctx.session - Access to the underlying session for advanced communication (see Session Properties and Methods)
ctx.request_context - Access to request-specific data and lifespan resources (see Request Context Properties)
await ctx.debug(message) - Send debug log message
await ctx.info(message) - Send info log message
await ctx.warning(message) - Send warning log message
await ctx.error(message) - Send error log message
await ctx.log(level, message, logger_name=None) - Send log with custom level
await ctx.report_progress(progress, total=None, message=None) - Report operation progress
await ctx.read_resource(uri) - Read a resource by URI
await ctx.elicit(message, schema) - Request additional information from user with validation
    
    """
    # The context parameter can have any name as long as it's type-annotated
    return ctx.client_id

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pro_craft-0.1.15.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pro_craft-0.1.15-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file pro_craft-0.1.15.tar.gz.

File metadata

  • Download URL: pro_craft-0.1.15.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for pro_craft-0.1.15.tar.gz
Algorithm Hash digest
SHA256 7eb1005de68fcc442e9485ea5f9528531b123446be08746905dd68488bf2f0b6
MD5 0195ca3ccd3d63e8e24df20f54491623
BLAKE2b-256 1e014e1d23eedf153608503930675dbe80c1f31efadb42df384de69e16e0ccdd

See more details on using hashes here.

File details

Details for the file pro_craft-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: pro_craft-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for pro_craft-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 df005c63a0bd619deb0dea2f13795f9652bc9feb46c878122faaa73c16a4d7c2
MD5 1bae67448ce901606098567e95f2db46
BLAKE2b-256 7146a7a6b9598a6897bcabb9f5a5fed8d310734ac49a702b1e2d2eb038645345

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page