MCPcopy Create free account

hub / github.com/anthropics/claude-cookbooks / functions

Functions640 in github.com/anthropics/claude-cookbooks

↓ 1 callersMethod_create_system_prompt
Create system prompt with memory instructions.
tool_use/memory_demo/code_review_demo.py:74
↓ 1 callersMethod_delete
Delete a file or directory.
tool_use/memory_tool.py:275
↓ 1 callersFunction_delete_pod_by_name
Delete a single pod by name, ignoring 404s.
claude_agent_sdk/hosting/kubernetes/gateway/k8s.py:357
↓ 1 callersFunction_drain_work
Drain the queue via the SDK poller, spawning a sandbox per work item. ``client.beta.environments.work.poller`` is the user-facing entry point: it
managed_agents/self_hosted_sandboxes/daytona/daytona_webhook.py:109
↓ 1 callersFunction_drain_work
Drain the queue via the SDK poller, spawning a sandbox per work item. ``drain=True`` returns when the queue is empty (the webhook handler must
managed_agents/self_hosted_sandboxes/modal/modal_sandbox_webhook.py:195
↓ 1 callersMethod_embed_and_store
(self, texts, data)
capabilities/retrieval_augmented_generation/evaluation/vectordb.py:34
↓ 1 callersMethod_embed_and_store
(self, texts, data)
capabilities/retrieval_augmented_generation/evaluation/vectordb.py:119
↓ 1 callersFunction_ensure_session_pod
Look up or provision the pod for a session. Returns its IP. Redis hash ``session:{id}`` is the source of truth for routing *and* ownership:
claude_agent_sdk/hosting/kubernetes/gateway/main.py:188
↓ 1 callersMethod_execute_tool_use
Execute a tool use and return the result.
tool_use/memory_demo/code_review_demo.py:91
↓ 1 callersFunction_extract_model_from_messages
Extract model identifier from messages.
claude_agent_sdk/utils/html_renderer.py:473
↓ 1 callersFunction_extract_notebook_path
Extract notebook path from test node ID.
tests/notebook_tests/conftest.py:36
↓ 1 callersFunction_extract_test_name
Extract test function name from test node ID.
tests/notebook_tests/conftest.py:42
↓ 1 callersMethod_find_closest_brand_color
Find the closest brand color to a given color.
skills/custom_skills/applying-brand-guidelines/apply_brand.py:307
↓ 1 callersFunction_find_live
(session_id: str)
managed_agents/self_hosted_sandboxes/daytona/daytona_webhook.py:102
↓ 1 callersFunction_find_live_sandbox
(key: str)
managed_agents/self_hosted_sandboxes/modal/modal_sandbox_webhook.py:106
↓ 1 callersFunction_format_subagent_completion_line
Format a subagent completion line with safe handling of None and long names. Args: subagent_name: Name of the subagent (may be None)
claude_agent_sdk/utils/agent_visualizer.py:301
↓ 1 callersFunction_format_tool_badge
Format a tool call as an HTML badge.
claude_agent_sdk/utils/html_renderer.py:487
↓ 1 callersFunction_format_tool_info
Format tool information with relevant parameters.
claude_agent_sdk/utils/agent_visualizer.py:278
↓ 1 callersFunction_generate_key_recommendations
Generate prioritized recommendations based on analysis.
skills/custom_skills/analyzing-financial-statements/interpret_ratios.py:353
↓ 1 callersMethod_get_general_benchmarks
Get general industry-agnostic benchmarks.
skills/custom_skills/analyzing-financial-statements/interpret_ratios.py:60
↓ 1 callersMethod_get_recommendation
Generate actionable recommendations based on ratio and rating.
skills/custom_skills/analyzing-financial-statements/interpret_ratios.py:153
↓ 1 callersFunction_h
(*parts)
tool_use/context_engineering/research_corpus.py:627
↓ 1 callersFunction_image_to_base64
Convert an image file to base64 encoded string.
claude_agent_sdk/utils/html_renderer.py:174
↓ 1 callersMethod_insert
Insert text at a specific line.
tool_use/memory_tool.py:240
↓ 1 callersFunction_is_dataframe
Check if content is a pandas DataFrame.
claude_agent_sdk/utils/html_renderer.py:159
↓ 1 callersFunction_is_jupyter
Detect if running in a Jupyter notebook environment. Returns True for Jupyter notebook/lab, False for terminal/scripts.
claude_agent_sdk/utils/agent_visualizer.py:44
↓ 1 callersFunction_is_series
Check if content is a pandas Series.
claude_agent_sdk/utils/html_renderer.py:164
↓ 1 callersFunction_main
()
claude_agent_sdk/hosting/run_once.py:25
↓ 1 callersFunction_process_work_item
Get-or-create a Modal Sandbox for one already-ack'd work item. The poller has already ack'd the item. Raises on Modal API errors — the caller
managed_agents/self_hosted_sandboxes/modal/modal_sandbox_webhook.py:155
↓ 1 callersFunction_reap_idle_loop
Background task: delete pods whose session has been idle too long. Without this, every session would hold a pod (and its CPU/memory request)
claude_agent_sdk/hosting/kubernetes/gateway/main.py:313
↓ 1 callersFunction_remember
(external_id: str, sdk_session_id: str)
claude_agent_sdk/hosting/server.py:163
↓ 1 callersMethod_rename
Rename or move a file/directory.
tool_use/memory_tool.py:312
↓ 1 callersFunction_render_dataframe
Render a pandas DataFrame as an HTML table. Args: df: pandas DataFrame Returns: HTML table string
claude_agent_sdk/utils/html_renderer.py:197
↓ 1 callersFunction_render_generic
Render generic content (dicts, lists, strings, other objects). Args: content: Any Python object Returns: HTML string re
claude_agent_sdk/utils/html_renderer.py:292
↓ 1 callersFunction_render_image
Render an image path as an HTML img tag with base64 encoding. Args: image_path: Path to the image file Returns: HTML st
claude_agent_sdk/utils/html_renderer.py:180
↓ 1 callersFunction_render_series
Render a pandas Series as an HTML table. Args: series: pandas Series Returns: HTML table string
claude_agent_sdk/utils/html_renderer.py:211
↓ 1 callersFunction_rerank_results
(query: str, results: list[dict], k: int = 5)
capabilities/retrieval_augmented_generation/evaluation/prompts.py:89
↓ 1 callersFunction_rerank_results
(query: str, results: list[dict], k: int = 3)
capabilities/retrieval_augmented_generation/evaluation/provider_retrieval.py:45
↓ 1 callersFunction_retrieve_advanced
(query: str, k: int = 3, initial_k: int = 20)
capabilities/retrieval_augmented_generation/evaluation/prompts.py:158
↓ 1 callersFunction_retrieve_base
(query, db)
capabilities/retrieval_augmented_generation/evaluation/prompts.py:17
↓ 1 callersFunction_serialize
Serialize an SDK message to JSON. SDK messages are dataclasses; ``dataclasses.asdict`` handles the nesting. ``default=str`` catches anything
claude_agent_sdk/hosting/server.py:179
↓ 1 callersFunction_serialize_ticket
Convert ticket to JSON string
tool_use/utils/customer_service_tools.py:40
↓ 1 callersFunction_spawn
Create a Daytona sandbox and start sandbox_runner.py inside it.
managed_agents/self_hosted_sandboxes/daytona/daytona_webhook.py:74
↓ 1 callersMethod_str_replace
Replace text in a file.
tool_use/memory_tool.py:202
↓ 1 callersFunction_stream
()
claude_agent_sdk/hosting/kubernetes/gateway/proxy.py:65
↓ 1 callersFunction_stream_turn
( external_id: str, prompt: str, options: ClaudeAgentOptions )
claude_agent_sdk/hosting/server.py:148
↓ 1 callersFunction_verify_webhook
( client: anthropic.AsyncAnthropic, raw: bytes, headers: "Mapping[str, str]" )
managed_agents/self_hosted_sandboxes/daytona/daytona_webhook.py:54
↓ 1 callersFunction_verify_webhook
``unwrap()`` is synchronous even on the async client — do not ``await`` it. The ``whsec_`` secret is passed to ``webhook_key`` as-is: the SDK
managed_agents/self_hosted_sandboxes/modal/modal_sandbox_webhook.py:83
↓ 1 callersMethod_view
View directory contents or file contents.
tool_use/memory_tool.py:119
↓ 1 callersFunctionactivityLabel
(activity: Activity | null, replyStarted: boolean)
managed_agents/roadtrip_planner/src/app/page.tsx:404
↓ 1 callersMethodadd_error
(self, message: str)
tests/notebook_tests/utils.py:39
↓ 1 callersMethodadd_items
Add items to cache. BUG: Using [] as default creates a SHARED list across all calls! This is one of Python's classic gotchas
tool_use/memory_demo/sample_code/cache_manager.py:16
↓ 1 callersMethodadd_items_fixed
Add items with proper default handling.
tool_use/memory_demo/sample_code/cache_manager.py:33
↓ 1 callersMethodadd_warning
(self, message: str)
tests/notebook_tests/utils.py:43
↓ 1 callersMethodanalyze_trend
Analyze trend in a ratio over time. Args: ratio_name: Name of the ratio values: List of ratio values
skills/custom_skills/analyzing-financial-statements/interpret_ratios.py:187
↓ 1 callersFunctionapply_brand_to_document
Main function to apply branding to any document type. Args: document_type: Type of document ('excel', 'powerpoint', 'pdf') c
skills/custom_skills/applying-brand-guidelines/apply_brand.py:395
↓ 1 callersFunctionattempt
(label: string, fn: () => Promise<unknown>)
managed_agents/roadtrip_planner/setup/teardown.ts:14
↓ 1 callersFunctionauthorized
(req: Request)
managed_agents/cma-mcp/src/server-http.ts:25
↓ 1 callersFunctionbuildPrompt
(event: AgentSessionEvent)
managed_agents/linear/src/agent.ts:57
↓ 1 callersMethodcalculate_all_ratios
Calculate all financial ratios.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:168
↓ 1 callersFunctioncalculate_cash_needed
Calculate total cash needed until profitability
claude_agent_sdk/chief_of_staff_agent/scripts/financial_forecast.py:73
↓ 1 callersMethodcalculate_efficiency_ratios
Calculate efficiency/activity ratios.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:106
↓ 1 callersMethodcalculate_equity_value
Calculate equity value from enterprise value. Args: net_debt: Total debt minus cash cash: Cash and equivalen
skills/custom_skills/creating-financial-models/dcf_model.py:320
↓ 1 callersFunctioncalculate_hiring_impact
Calculate the financial impact of hiring engineers. Args: num_engineers: Number of engineers to hire salary_per_engineer: An
claude_agent_sdk/chief_of_staff_agent/scripts/hiring_impact.py:11
↓ 1 callersMethodcalculate_leverage_ratios
Calculate leverage/solvency ratios.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:82
↓ 1 callersMethodcalculate_liquidity_ratios
Calculate liquidity ratios.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:61
↓ 1 callersFunctioncalculate_metrics
Calculate key financial metrics.
claude_agent_sdk/chief_of_staff_agent/scripts/simple_calculation.py:11
↓ 1 callersFunctioncalculate_mrr
(retrieved_links: list[str], correct_links)
capabilities/retrieval_augmented_generation/evaluation/eval_retrieval.py:5
↓ 1 callersFunctioncalculate_profitability_date
Find when company becomes profitable
claude_agent_sdk/chief_of_staff_agent/scripts/financial_forecast.py:65
↓ 1 callersMethodcalculate_profitability_ratios
Calculate profitability ratios.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:33
↓ 1 callersFunctioncalculate_ratios_from_data
Main function to calculate all ratios from financial data. Args: financial_data: Dictionary with financial statement data Retur
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:243
↓ 1 callersMethodcalculate_score
Calculate compliance score (0-100)
skills/custom_skills/applying-brand-guidelines/validate_brand.py:142
↓ 1 callersMethodcalculate_terminal_value
Calculate terminal value using perpetuity growth or exit multiple. Args: method: 'growth' for perpetuity growth, 'multip
skills/custom_skills/creating-financial-models/dcf_model.py:227
↓ 1 callersMethodcalculate_valuation_ratios
Calculate valuation ratios.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:130
↓ 1 callersMethodcalculate_wacc
Calculate Weighted Average Cost of Capital (WACC). Args: risk_free_rate: Risk-free rate (e.g., 10-year treasury)
skills/custom_skills/creating-financial-models/dcf_model.py:105
↓ 1 callersFunctioncanon
(name: str)
capabilities/knowledge_graph/evaluation/eval_extraction.py:95
↓ 1 callersFunctioncells
(row: string)
managed_agents/roadtrip_planner/src/components/markdown.tsx:54
↓ 1 callersFunctionclampToolOutput
* Tool results are curl output, routinely tens of KB of JSON. The chat only * needs enough to show the call worked. The full payload stays in the *
managed_agents/roadtrip_planner/src/lib/transcript.ts:289
↓ 1 callersMethodclear_all_memory
Clear all memory files (useful for testing or starting fresh). ⚠️ WARNING: This method is for demonstration and testing purposes onl
tool_use/memory_tool.py:344
↓ 1 callersFunctionconfluence_create_postmortem
Create a post-mortem page in Confluence.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:1958
↓ 1 callersFunctionconfluence_get_page
Get a Confluence page by ID or title.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:2054
↓ 1 callersFunctionconfluence_list_postmortems
List recent post-mortem pages.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:2143
↓ 1 callersFunctionconvert_markdown_to_slack
Convert standard Markdown to Slack mrkdwn format.
claude_agent_sdk/site_reliability_agent/examples/sre_bot_slack.py:387
↓ 1 callersFunctioncreate_agent_pod
Get a running agent pod for a session. Returns the pod IP address. Strategy: 1. Try to claim a pre-warmed standby pod (instant). 2. If n
claude_agent_sdk/hosting/kubernetes/gateway/k8s.py:491
↓ 1 callersFunctioncreate_decision_matrix
Create a weighted decision matrix for strategic choices
claude_agent_sdk/chief_of_staff_agent/scripts/decision_matrix.py:36
↓ 1 callersMethoddelete_user
Delete a user. BUG: SQL INJECTION in DELETE statement! This is especially dangerous as it can lead to data loss.
tool_use/memory_demo/sample_code/sql_query_builder.py:52
↓ 1 callersFunctiondeploy
()
claude_agent_sdk/hosting/modal/modal_app.py:48
↓ 1 callersFunctiondetermine_priority
Simple priority determination rules
tool_use/utils/customer_service_api.py:256
↓ 1 callersMethoddispatch
(opts: DispatchOpts)
managed_agents/self_hosted_sandboxes/cf/src/container.ts:42
↓ 1 callersFunctiondisplay_card
Display rendered HTML content inside a styled card. Args: content: Pre-rendered HTML content title: Optional title for the c
claude_agent_sdk/utils/html_renderer.py:349
↓ 1 callersFunctiondownload_file
Download a file from Claude's Files API and save it locally. Args: client: Anthropic client instance file_id: The file ID re
skills/file_utils.py:90
↓ 1 callersFunctiondrainWork
* Drain the work queue. The TS `WorkPoller` long-polls and never returns on an * empty queue, but a Worker fetch handler must respond — so poll → ack
managed_agents/self_hosted_sandboxes/cf/src/index.ts:55
↓ 1 callersFunctiondrainWork
* Drain the work queue. The TS `WorkPoller` long-polls and never returns on * an empty queue, but a serverless handler must respond — so poll → ack u
managed_agents/self_hosted_sandboxes/vercel/api/webhook.ts:263
↓ 1 callersFunctiondrainWork
* Drain the work queue. The TS `WorkPoller` long-polls and never returns on an * empty queue, but a Worker fetch handler must respond — so poll → ack
managed_agents/self_hosted_sandboxes/cf-worker/src/index.ts:56
↓ 1 callersFunctionedit_config_file
Edit a configuration file by replacing a value.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:2252
↓ 1 callersFunctionenv
* Ensure the browser has a usable Managed Agents session and hand back its * event log. Called on page load (so the sandbox is warm before the first
managed_agents/roadtrip_planner/src/app/api/session/route.ts:20
↓ 1 callersFunctionerrDetail
* Structured, redacted error detail for log lines. Surfaces the SDK's * `status` + `requestID` when present so an API failure is correlatable to a *
managed_agents/self_hosted_sandboxes/cf/src/index.ts:37
↓ 1 callersFunctionerrDetail
* Structured, redacted error detail for log lines. Surfaces the SDK's * `status` + `requestID` when present so an API failure is correlatable to a *
managed_agents/self_hosted_sandboxes/cf-worker/src/index.ts:38
↓ 1 callersFunctionevaluate_end_to_end
(query, generated_answer, correct_answer)
capabilities/retrieval_augmented_generation/evaluation/eval_end_to_end.py:8
↓ 1 callersFunctionevaluate_retrieval
(retrieved_links, correct_links)
capabilities/retrieval_augmented_generation/evaluation/eval_retrieval.py:12
← previousnext →101–200 of 640, ranked by callers