Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/claude-cookbooks
/ functions
Functions
640 in github.com/anthropics/claude-cookbooks
⨍
Functions
640
◇
Types & classes
67
↳
Endpoints
7
↓ 1 callers
Function
execute_notebook
Execute a notebook in an isolated environment. Args: path: Path to the notebook timeout: Maximum execution time in seconds
tests/notebook_tests/utils.py:295
↓ 1 callers
Method
execute_notebook
Execute a notebook and return success status.
scripts/validate_all_notebooks.py:204
↓ 1 callers
Function
execute_runbook
Execute a documented runbook for incident response.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:1458
↓ 1 callers
Function
execute_tool
Execute a tool use and return the result. Args: tool_use: The tool use object from Claude's response memory_handler: The mem
tool_use/memory_demo/demo_helpers.py:14
↓ 1 callers
Function
extract
(client: anthropic.Anthropic, text: str)
capabilities/knowledge_graph/evaluation/eval_extraction.py:72
↓ 1 callers
Function
extract_file_ids
Extract all file IDs from a Claude API response. Skills create files during code execution and return file_id attributes in the tool res
skills/file_utils.py:18
↓ 1 callers
Function
extract_pip_dependencies
Extract pip dependencies from notebook cells. Looks for %pip install and !pip install commands.
tests/notebook_tests/utils.py:225
↓ 1 callers
Function
fakeTools
(fs: FakeFS)
managed_agents/self_hosted_sandboxes/cf-worker/src/tools.ts:19
↓ 1 callers
Method
fetch_all
Fetch multiple endpoints concurrently. BUG: Similar to the threading issue, multiple coroutines modify self.responses and se
tool_use/memory_demo/sample_code/api_client_v1.py:37
↓ 1 callers
Method
fetch_endpoint
Fetch a single endpoint.
tool_use/memory_demo/sample_code/api_client_v1.py:20
↓ 1 callers
Function
fetch_summary
(title: str)
capabilities/knowledge_graph/evaluation/eval_extraction.py:65
↓ 1 callers
Function
findLiveSandbox
* Find an existing running sandbox for this session and renew its lifetime. * Returns `null` when there's no mapping, the mapped sandbox is no longer
managed_agents/self_hosted_sandboxes/vercel/api/webhook.ts:119
↓ 1 callers
Function
firstLine
(text: string)
managed_agents/roadtrip_planner/src/app/page.tsx:399
↓ 1 callers
Method
fix_deprecated_models
Fix deprecated models in a notebook.
scripts/validate_all_notebooks.py:654
↓ 1 callers
Function
flush_pending_tools
Print accumulated tool calls in a compact format.
claude_agent_sdk/utils/agent_visualizer.py:364
↓ 1 callers
Function
flush_tools
()
claude_agent_sdk/utils/html_renderer.py:516
↓ 1 callers
Function
foldTranscript
( events: ManagedAgentEvent[], preview?: BetaManagedAgentsAgentMessageEvent | null, liveThinkingId?: str
managed_agents/roadtrip_planner/src/lib/transcript.ts:90
↓ 1 callers
Function
forecast_financials
Generate financial forecast with multiple scenarios
claude_agent_sdk/chief_of_staff_agent/scripts/financial_forecast.py:12
↓ 1 callers
Method
format_excel
Apply brand formatting to Excel workbook configuration. Args: workbook_config: Excel workbook configuration dictionary
skills/custom_skills/applying-brand-guidelines/apply_brand.py:51
↓ 1 callers
Method
format_pdf
Apply brand formatting to PDF document configuration. Args: document_config: PDF document configuration dictionary
skills/custom_skills/applying-brand-guidelines/apply_brand.py:170
↓ 1 callers
Method
format_powerpoint
Apply brand formatting to PowerPoint presentation configuration. Args: presentation_config: PowerPoint configuration dic
skills/custom_skills/applying-brand-guidelines/apply_brand.py:102
↓ 1 callers
Method
format_ratio
Format ratio value for display.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:229
↓ 1 callers
Function
generate_analysis
Generate strategic analysis of the decision
claude_agent_sdk/chief_of_staff_agent/scripts/decision_matrix.py:114
↓ 1 callers
Function
generate_author_url
(name: str)
managed_agents/example_data/orchestrate/src/blog.py:11
↓ 1 callers
Function
generate_post_url
(title: str, published: date)
managed_agents/example_data/orchestrate/src/blog.py:6
↓ 1 callers
Function
generate_postmortem_content
Generate Confluence Storage Format (XHTML) for post-mortem.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:1870
↓ 1 callers
Method
generate_report
Generate a comprehensive interpretation report. Args: ratios: Dictionary of calculated ratios Returns:
skills/custom_skills/analyzing-financial-statements/interpret_ratios.py:229
↓ 1 callers
Method
generate_suggestions
Generate helpful suggestions based on violations and warnings
skills/custom_skills/applying-brand-guidelines/validate_brand.py:150
↓ 1 callers
Function
generate_summary
Generate a text summary of the financial analysis.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:274
↓ 1 callers
Method
generate_summary
Generate text summary of valuation results. Returns: Formatted summary string
skills/custom_skills/creating-financial-models/dcf_model.py:408
↓ 1 callers
Method
generate_ticket
Generate a single realistic ticket
tool_use/utils/customer_service_api.py:155
↓ 1 callers
Function
get_acme_corporation_guidelines
Get default Acme Corporation brand guidelines. These guidelines match the standards defined in the SKILL.md reference. Users should cust
skills/custom_skills/applying-brand-guidelines/validate_brand.py:239
↓ 1 callers
Function
get_activity_text
Extract activity text from a message
claude_agent_sdk/chief_of_staff_agent/agent.py:18
↓ 1 callers
Function
get_alerts
Get currently firing alerts. Simulated — no AlertManager running in demo.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:949
↓ 1 callers
Function
get_custom_budget
Get the custom quarterly travel budget for a specific employee. Most employees have a standard $5,000 quarterly travel budget. However, some
tool_use/utils/team_expense_api.py:454
↓ 1 callers
Function
get_expenses
Returns all expense line items for a given employee in a specific quarter. Each expense includes comprehensive metadata: date, category, descript
tool_use/utils/team_expense_api.py:217
↓ 1 callers
Function
get_github_mcp_server
Get the GitHub MCP server configuration. Returns: MCP server config dict, or empty dict if GITHUB_TOKEN not set.
claude_agent_sdk/observability_agent/agent.py:40
↓ 1 callers
Function
get_logs
Fetch real logs from Docker containers.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:916
↓ 1 callers
Function
get_notebook_kernel_info
Extract kernel information from notebook metadata.
tests/notebook_tests/utils.py:357
↓ 1 callers
Function
get_notebooks_to_test
Determine which notebooks to test based on config options.
tests/conftest.py:78
↓ 1 callers
Function
get_pool_status
Return the current state of the standby pool. Useful for health checks and debugging — tells you how many standby pods are ready vs. the targ
claude_agent_sdk/hosting/kubernetes/gateway/k8s.py:582
↓ 1 callers
Function
get_recent_deployments
Get recent deployments. Simulated — no deployment tracker running in demo.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:1045
↓ 1 callers
Function
get_recommendation
Generate hiring recommendation based on score
claude_agent_sdk/chief_of_staff_agent/scripts/talent_scorer.py:69
↓ 1 callers
Function
get_service_health
Get a comprehensive health summary across all services.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:772
↓ 1 callers
Method
get_statistics
Get processing statistics. BUG: Accessing shared state without ensuring thread-safety. If called while processing, could get
tool_use/memory_demo/sample_code/data_processor_v1.py:69
↓ 1 callers
Method
get_stats
Get scraping statistics.
tool_use/memory_demo/sample_code/web_scraper_v1.py:54
↓ 1 callers
Method
get_summary
Get summary statistics.
tool_use/memory_demo/sample_code/api_client_v1.py:60
↓ 1 callers
Function
get_team_members
Returns a list of team members for a given department. Each team member includes their ID, name, role, level, and contact information. Use th
tool_use/utils/team_expense_api.py:20
↓ 1 callers
Method
get_user_by_name
Get user by username. BUG: SQL INJECTION VULNERABILITY! Using string formatting with user input allows SQL injection.
tool_use/memory_demo/sample_code/sql_query_builder.py:22
↓ 1 callers
Method
get_user_by_name_safe
Safe version using parameterized queries.
tool_use/memory_demo/sample_code/sql_query_builder.py:34
↓ 1 callers
Method
get_users_by_role
Get users by role. BUG: SQL INJECTION in ORDER BY clause! Even the ORDER BY clause can be exploited.
tool_use/memory_demo/sample_code/sql_query_builder.py:64
↓ 1 callers
Function
globToRegex
(pat: string)
managed_agents/self_hosted_sandboxes/cf-worker/src/tools.ts:14
↓ 1 callers
Function
handleCmaWebhook
(req: Request)
managed_agents/linear/src/cma-webhook.ts:10
↓ 1 callers
Function
handleCmaWebhook
(req: Request)
managed_agents/slack/src/cma-webhook.ts:10
↓ 1 callers
Function
handleOAuthAuthorize
()
managed_agents/linear/src/oauth.ts:24
↓ 1 callers
Function
handleOAuthCallback
(url: URL)
managed_agents/linear/src/oauth.ts:35
↓ 1 callers
Function
handleSlackEvents
(req: Request)
managed_agents/slack/src/slack-events.ts:35
↓ 1 callers
Function
handle_mention
Handle @mentions in Slack channels.
claude_agent_sdk/site_reliability_agent/examples/sre_bot_slack.py:525
↓ 1 callers
Function
handle_request
Handle an incoming JSON-RPC request.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:2658
↓ 1 callers
Function
handle_tool_call
Route tool calls to the appropriate handler.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:2547
↓ 1 callers
Method
heartbeatLoop
(client: Anthropic, opts: StartOpts, ctrl: AbortController)
managed_agents/self_hosted_sandboxes/cf-worker/src/runner.ts:99
↓ 1 callers
Function
identify_risks
Identify potential risk factors
claude_agent_sdk/chief_of_staff_agent/scripts/talent_scorer.py:83
↓ 1 callers
Function
initialize_standby_pool
Pre-warm the standby pool on gateway startup. Called once during application boot. If K8s is unavailable (e.g. local dev), this is a no-op.
claude_agent_sdk/hosting/kubernetes/gateway/k8s.py:476
↓ 1 callers
Method
interactive_menu
Main interactive menu.
scripts/validate_all_notebooks.py:705
↓ 1 callers
Method
interpret_ratio
Provide interpretation for a specific ratio.
skills/custom_skills/analyzing-financial-statements/calculate_ratios.py:178
↓ 1 callers
Function
interrupt
(session_id: string)
managed_agents/cma-mcp/src/cma.ts:49
↓ 1 callers
Method
invoke_model_with_response_stream
(self, prompt, max_tokens=1000)
capabilities/contextual-embeddings/contextual-rag-lambda-function/inference_adapter.py:15
↓ 1 callers
Function
isFatal4xx
(e: unknown)
managed_agents/self_hosted_sandboxes/cf-worker/src/runner.ts:31
↓ 1 callers
Function
is_sorted
Check if the keys are sorted alphabetically (case-insensitive).
scripts/validate_authors_sorted.py:33
↓ 1 callers
Function
itemBody
(item: RailItem)
managed_agents/roadtrip_planner/src/components/tool-rail.tsx:124
↓ 1 callers
Function
itemDotClass
(item: RailItem)
managed_agents/roadtrip_planner/src/components/tool-rail.tsx:81
↓ 1 callers
Function
itemLabel
(item: RailItem)
managed_agents/roadtrip_planner/src/components/tool-rail.tsx:88
↓ 1 callers
Function
itemMeta
(item: RailItem)
managed_agents/roadtrip_planner/src/components/tool-rail.tsx:103
↓ 1 callers
Function
json
(result: unknown)
managed_agents/cma-mcp/src/tools.ts:5
↓ 1 callers
Function
kickoffAgentSession
(event: AgentSessionEvent)
managed_agents/linear/src/agent.ts:26
↓ 1 callers
Function
kickoffAgentSession
(m: SlackMention)
managed_agents/slack/src/agent.ts:19
↓ 1 callers
Function
leaf
(text: string, key: string)
managed_agents/roadtrip_planner/src/components/markdown.tsx:14
↓ 1 callers
Method
lifecycleWatch
* Stream session status and renew the container's activity timeout on * every event. The CLI inside the container owns dispatch + heartbeat + *
managed_agents/self_hosted_sandboxes/cf/src/container.ts:83
↓ 1 callers
Function
list_metrics
List available metrics in Prometheus.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:719
↓ 1 callers
Function
list_notebooks
List all notebooks in the project.
scripts/test_notebooks.py:44
↓ 1 callers
Function
llm_eval
Evaluate summary using an LLM (Claude). Args: summary (str): The summary to evaluate. input (str): The original text that was summar
capabilities/summarization/evaluation/custom_evals/llm_eval.py:8
↓ 1 callers
Function
load
()
managed_agents/linear/src/oauth.ts:12
↓ 1 callers
Function
load_alias_map
Surface-form variants mapped to canonical gold names. Without this a predicted "National Aeronautics and Space Administration" never matches
capabilities/knowledge_graph/evaluation/eval_extraction.py:54
↓ 1 callers
Function
load_authors
Load authors.yaml and return the data.
scripts/validate_authors_sorted.py:27
↓ 1 callers
Method
load_data
(self, data)
capabilities/text_to_sql/evaluation/vectordb.py:27
↓ 1 callers
Method
load_db
(self)
capabilities/retrieval_augmented_generation/evaluation/vectordb.py:80
↓ 1 callers
Method
load_db
(self)
capabilities/retrieval_augmented_generation/evaluation/vectordb.py:165
↓ 1 callers
Method
load_state
Load previous validation state if exists.
scripts/validate_all_notebooks.py:30
↓ 1 callers
Function
main
Run all three demo sessions.
tool_use/memory_demo/code_review_demo.py:302
↓ 1 callers
Function
main
Test the async API client.
tool_use/memory_demo/sample_code/api_client_v1.py:73
↓ 1 callers
Function
main
Demonstrate the customer service ticket system
tool_use/utils/customer_service_api.py:283
↓ 1 callers
Function
main
()
claude_agent_sdk/chief_of_staff_agent/scripts/hiring_impact.py:69
↓ 1 callers
Function
main
()
claude_agent_sdk/chief_of_staff_agent/scripts/decision_matrix.py:158
↓ 1 callers
Function
main
()
claude_agent_sdk/chief_of_staff_agent/scripts/talent_scorer.py:111
↓ 1 callers
Function
main
()
claude_agent_sdk/chief_of_staff_agent/scripts/financial_forecast.py:84
↓ 1 callers
Function
main
()
claude_agent_sdk/hosting/modal/teardown.py:18
↓ 1 callers
Function
main
Main event loop - read JSON-RPC requests from stdin.
claude_agent_sdk/site_reliability_agent/sre_mcp_server.py:2691
↓ 1 callers
Function
main
Start the Slack bot and webhook server.
claude_agent_sdk/site_reliability_agent/examples/sre_bot_slack.py:663
↓ 1 callers
Function
main
()
scripts/validate_authors_sorted.py:70
↓ 1 callers
Function
main
Check notebooks passed as arguments.
scripts/validate_notebooks.py:36
← previous
next →
201–300 of 640, ranked by callers