
    ~h                     $   d Z ddlZddlmZ ddlmZmZmZmZ  e       Z	 G d de      Z
 e
d      Z e
d      Zej                  e	d	
       ej                  e	d
       d Zedk(  r( ej                    e              e	j!                          yy)z'Sample code for FastMCP using MCPMixin.    N)FastMCP)MCPMixin
mcp_promptmcp_resourcemcp_toolc                   d    e Zd Zd Z e       d        Z ed      d        Z e       d        Z	y)Samplec                     || _         y )Nname)selfr   s     ]/opt/mcp/mcp-sentiment/venv/lib/python3.12/site-packages/fastmcp/contrib/mcp_mixin/example.py__init__zSample.__init__   s	    	    c                 "    d| j                    dS )zFirst tool description.zExecuted tool .r   r   s    r   
first_toolzSample.first_tool   s      		{!,,r   ztest://test)uric                 "    d| j                    dS )zFirst resource description.zExecuted resource r   r   r   s    r   first_resourcezSample.first_resource   s     $DII;a00r   c                 "    d| j                    dS )zFirst prompt description.zhere's a prompt! r   r   r   s    r   first_promptzSample.first_prompt   s     #499+Q//r   N)
__name__
__module____qualname__r   r   r   r   r   r   r    r   r   r	   r	      sL     Z- - m$1 %1 \0 0r   r	   FirstSecondfirst)
mcp_serverprefixsecondc                  H  K   t        d       t        dt        t        j                          d {                t        dt        t        j	                          d {                t        dt        t        j                          d {                y 7 k7 >7 w)Nz0MCP Server running with registered components...zTools:z
Resources:zPrompts:)printlistmcp	get_toolsget_resourcesget_promptsr   r   r   list_componentsr+   +   sh     	
<=	(Ds}}./0	,3#4#4#6678	*d!2234 /62s3   .B"B.B"B .B"B B"B" B"__main__)__doc__asynciofastmcpr   fastmcp.contrib.mcp_mixinr   r   r   r   r'   r	   first_samplesecond_sampleregister_allr+   r   runr   r   r   <module>r5      s    -    i0X 0( gx    S  9   c(  ;5 zGKK!"GGI r   